unclip18_ok.bat Download unclip18_ok.bat Download unclip18_ok.txt
Nachfolgende Zeile in den Zwischenspeicher mit Ctrl-C kopieren. Die Batchdatei zeigt dann diesen Inhalt in der Command-Shell an.
"DO IT";"STAN DARD";"Window Titel1";"C:\Windows\System32\Calc.exe ";"(Testdatei.txt)"
@echo off & SetLocal EnableDelayedExpansion
REM Testwerte: "DOIT";"STAN DARD";"Window Titel1";"C:\Windows\System32\Calc.exe ";"(Testdatei.txt)"

rem Erste Zahl [Hintergrundfarbe] - Zweite Zahl [Schriftfarbe]
COLOR 3F

rem Dieser Zeichensatz unterstützt [äöü]'s
CHCP 1252>nul:

REM --- Nützliche BATCH-Befehle ---
rem Suche: ['] Ersetzte mit: ["]
rem SET ersetzeHochkomma=%clipboard:'="%

rem ECHO %ersetzeHochkomma:$=^&%>C:\temp\befehl.bat
rem call C:\temp\befehl.bat

rem start "neuesFensters" /max %tool% %parameter%

REM unclip18_ok.bat
rem ["DOIT";"STAN DARD";"Window Titel1";"C:\Windows\System32\Notepad.exe ";"Testdatei.txt"]
rem Obere Zeile ohne rem in Zwischenablage kopieren [Ctrl-C]

:ANFANG
REM ----------------------------
REM Clipboard auslesen
REM ----------------------------
FOR /F "tokens=*" %%a in ('PowerShell.exe -ExecutionPolicy ByPass -Command "& {Get-Clipboard}"') do SET clipboard=%%a
ECHO Zwischenspeicher [%clipboard%]

REM ----------------------------
REM Clipboard leeren
REM ----------------------------
cmd.exe /c "echo off | clip
Goto :SpitIt

:SpitIt
FOR /F "tokens=1,2,3,4,5 delims=;" %%i in ("%clipboard%") do (
set var1=%%i
set var2=%%j
set var3=%%k
set var4=%%l
set var5=%%m
)
if not %var1%$==$ ECHO %var1%
if not %var2%$==$ ECHO %var2%
if not %var3%$==$ ECHO %var3%
if not %var4%$==$ ECHO %var4%
if not %var5%$==$ ECHO %var5%
Goto :Start

:Start
if %var1%$=="DOIT"$ Echo - DOIT -
if %var1%$=="DOIT"$ call %var4%
if %var1%$==""$ Echo "Mache nichts !"
SET clipboard=
SET var1=
SET var2=
SET var3=
SET var4=
SET var5=
timeout /T 1
GOTO :ANFANG




url-to-clipboard-local.html Download
Herunterladen und von [url-to-clipboard-local.txt] nach [url-to-clipboard-local.html] umbenennen und anschliessend im Browser mittels Crtl-O öffnen/auswählen.
Web-Browser [Internet Explorer 11] über eine Verknüpfung im Vollbildmodus mit lokaler Webseite starten:
"C:\Program Files (x86)\internet explorer\iexplore.exe" -k file://C:/Users/[Profilname]/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/url-to-clipboard-local.html
test.bat
@echo off
ECHO "Hallo Welt !!!"
pause > nul:

Excel-Macro.bas
REM ***** BASIC *****


Sub ExampleRun_bat5_ok
Dim Ergebnis
Ergebnis = Shell("cmd /c cmd /c c:\temp\run2.bat", 0)
Shell "cmd /c cmd /c c:\temp\run2.bat", 0
End Sub

Sub ExampleRun_bat6_ok
Shell "cmd /c cmd /c c:\temp\run2.bat", 0
End Sub

Sub ExampleRun_bat7_ok
Dim Ergebnis
Ergebnis = Shell("cmd /c cmd /c c:\temp\run2.bat", 0)
End Sub

Sub ExampleCmdForWin_ok
Shell("cmd /c c:\windows\system32\cmd.exe",0)
End Sub

Sub ExampleCalcForWin_ok
Shell("c:\windows\system32\calc.exe",2)
End Sub



Sub CallCMD2()
Dim Ergebnis
Ergebnis = Shell("cmd /c dir C:\*.* > C:\Temp\0_dir_c1.txt", 1)
Shell "cmd /c dir C:\*.* > C:\Temp\0_dir_c2.txt", 1
CreateObject("WScript.Shell").Exec ("%comspec% /c dir C:\*.* > C:\Temp\0_dir_c3.txt")
End Sub

Sub List_Root()
While NextFile <> ""
oCursor.gotoEnd(false)
oText.insertString( oCursor,Nextfile, False )
oText.insertControlCharacter( oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False )
oCursor.gotoPreviousParagraph(false)
oCursor.gotoStartofParagraph(false)
oCursor.gotoEndofParagraph(true)
oCursor.hyperlinkurl="file:///c:/"&Nextfile
NextFile = Dir
wend
End Sub
REM ---------------------------------------------


REM ---------------------------------------------
Sub DateienAuflisten()

Dim lngZeile As Long
Dim objFileSystem As Object
Dim objVerzeichnis As Object
Dim objDateienliste As Object
Dim objDatei As Object

Set objFileSystem = CreateObject("scripting.FileSystemObject")
Set objVerzeichnis = objFileSystem.GetFolder("C:\temp")
Set objDateienliste = objVerzeichnis.Files

lngZeile = 1

For Each objDatei In objDateienliste
If Not objDatei Is Nothing Then
ActiveSheet.Cells(lngZeile, 1) = objDatei.Name
lngZeile = lngZeile + 1
End If
Next objDatei

End Sub
REM ---------------------------------------------

REM ---------------------------------------------
Sub UnterOrdnerAuslesen(ByVal strDateipfad As String)

Dim objFileSystem As Object
Dim objVerzeichnis As Object
Dim objUnterordner As Object
Dim objDatei As Object
Dim i As Long

Set objFileSystem = CreateObject("Scripting.FileSystemObject")
Set objVerzeichnis = objFileSystem.getfolder(strDateipfad)

If Cells(Rows.Count, 1).End(xlUp).Row > 1 Then
i = Cells(Rows.Count, 1).End(xlUp).Row + 1
Else
i = 1
End If

For Each objUnterordner In objVerzeichnis.subfolders
For Each objDatei In objUnterordner.Files
If Not objDatei Is Nothing And Not Right(objDatei.Name, 4) = ".jpg" Then
ActiveSheet.Cells(i, 1) = objDatei.Name
ActiveSheet.Cells(i, 2) = objUnterordner.Path
i = i + 1
End If
Next objDatei
Call UnterOrdnerAuslesen(objUnterordner.Path)
If Cells(Rows.Count, 1).End(xlUp).Row > 1 Then
i = Cells(Rows.Count, 1).End(xlUp).Row + 1
Else
i = 1
End If
Next objUnterordner

Call UnterOrdnerAuslesen(objVerzeichnis)

End Sub
REM ---------------------------------------------

REM ---------------------------------------------
Sub Main
Dim suchbegriff As String
suchbegriff = InputBox("Bitte geben Sie den Suchbegriff ein", "Eingabe")
Shell "C:\Program Files\Internet Explorer\iexplore.exe " & _
"http://www.google.de/search?q=" & suchbegriff, vbMaximizedFocus

End Sub
REM ---------------------------------------------

Sub Macro1

End Sub

eof