Archiv der Kategorie: Programmieren

autoit Syntax Encrypt, Verschlüsseln

die Funktion _StringEncrypt(), die in älteren Versionen von autoit in string.au3 enthalten war,

gibt es ab autoit 3.3.12.0 nicht mehr.

 

Die Funktion _StringEncrypt() ist nun in crypt_GQ.au3  enthalten.

 

In diesem Script:

       D:\DATA\_INFO\_SoftWare\_LANdesk_\_SW-Verteilung\Quinting\_TEST_\Encryption\_Test_Encrypt_2.au3

wird sowohl die alte als auch die neue Verschlüsselung exemplarisch genutzt.

 


 

alte Funktion (vor 3.3.12.0)

 

#include <crypt_GQ.au3>

 

$Debug = 1                ; default: 0

$Text = "Hallo"

$CryptPass = "Passwort"

$Methode = "alt"        ; (eine von "alt|3DES|AES128|AES192|DES|RC2|RC4")

$KeyDepth = 2                ; default: 2

$verschluesselt =_Verschluesseln($Text,$CryptPass,[$Methode,[$KeyDepth;[$Debug]]])

 

$Debug = 0                ; default: 0

$Text = "0229813FB7566E6E499C20994E4FE048745E2BBC"

$CryptPass = "Passwort"

$Methode = "alt"        ; (eine von "alt|3DES|AES128|AES192|DES|RC2|RC4")

$KeyDepth = 2                ; default: 2

$entschluesselt =_Entschluesseln($Text,$CryptPass,[$Methode,[$KeyDepth;[$Debug]]])

 


 

Login mit autoit und PHP:

 

PHP-Datei: check.php

<?php

$host = 'yourhost';

$user = 'dbusername';

$pass = 'dbpassword';

$dbase = 'yourdatabase';

 

mysql_connect($host, $user, $pass);

mysql_select_db($dbase);

 

$sUsername = mysql_real_escape_string($_GET[‚username‘];

$sPassword = md5(mysql_real_escape_string($_GET[‚password‘]));

 

$result = mysql_query("SELECT id FROM TABLE WHERE username = '" . $sUsername . "' AND password = '" . $sPassword . "'"); // Your SQL Statement

$row = mysql_fetch_row($result);

 

if ($row) {

  echo 1;

} else {

  echo 0;

}

?>

 

autoit Script:

#include <INet.au3>

$user = InputBox("Login", "Please enter your username", "", "")

$pass = InputBox("Login", "Please enter your password", "", "")

$iRValue = _INetGetSource("http://yourdomain.de/check.php?username=" & $user & "&password=" & $pass)

if $iRValue = 1 Then

  ; Login Successfully

ElseIf $iRValue = 2 Then

  ; Login Failed

EndIf

 


 

MD5 Check mit autoit und PHP:

 

PHP-Datei: check.php

<?php

$sPassword = 'password';

$md5 = md5($sPassword);

echo $md5

?>

 

autoit Script:

#include <INet.au3>

$pass = InputBox("Login", "Please enter your password", "", "")

$iRValue = _INetGetSource("http://DE19HAI827004NB.de.flg.int/vplaner/check.php?password=" & $pass)

msgbox(64,"Info", "Passwort: " & $pass & @crlf & "MD5-Hash: " & $iRValue)

 

autoit Syntax Datum und Zeit

Makro Description Example
@YEAR Current four-digit year 2016
@MON Current month.  Range is 01 to 12 11
@MDAY Current day of month.  Range is 01 to 31 25
@HOUR Hours value of clock in 24-hour format.  Range is 00 to 23 08
@MIN Minutes value of clock.  Range is 00 to 59 48
@SEC Seconds value of clock.  Range is 00 to 59 59

 

Beispiel für Datum mit 2-stelliger Jahreszahl und Zeit: 131025-0848

       StringRight(@YEAR,2) & @MON & @MDAY & "-" & @HOUR & @MIN

 

Beispiel für Datum mit 4-stelliger Jahreszahl und Zeit: 20.01.2014 09:23

       @MDAY & "." & @MON & "." & @YEAR & " " & @HOUR & ":" & @MIN

 

Beispiel kopiert Filename.ext zu Filename_ext_131025-0848.bck

       wobei $File den Dateinamen enthält.

$aFilename = StringSplit($File,".")

FileCopy ( $File, $aFilename[1] & „_“ & $aFilename[2] & StringRight(@YEAR,2) & @MON & @MDAY & "-" & @HOUR & @MIN & ".bck" [, flag])        

 

Flag:    0        default, no overwrite existing files
1        overwrite existing files
8        Create destination directory structure if it doesn't exist
9        1 + 8

 


 

Datum und Uhrzeit der aktuellen ProgrammDatei:

$ScriptDate = FileGetTime(@ScriptFullPath)

$ScriptDateTime = $ScriptDate[2] & „.“ & $ScriptDate[1] & „.“ & $ScriptDate[0] & “ – “ & $ScriptDate[3] & „:“ & $ScriptDate[4]

$ScriptDateTime = 18.02.2014 – 14:36

 


 

—————————

DEBUG Date Info

—————————

$GetLastLoginDate: 20150629140524

 

LastPwChanged: 2015/06/01 07:17:06

 

PwExpires: 2015/07/13 07:17:06

 

jetzt: 2015/06/29 14:44:14

—————————

 

_DateDiff ( $sType, $sStartDate, $sEndDate )
 

 

 

 

autoit Syntax Copyright

So kann man einen Copyright-Vermerk in einem Fenster ausgeben:

 Global $Autor        = "Georg Quinting"

Global $Version        = "v1.0"

Global $Date        = "14.07.2014"

Global $TimeNow        = @MDAY & "." & @MON & "." & @YEAR & "   " & @HOUR & ":" & @MIN

Global $Copyright        =  StringTrimRight(@ScriptName,4) & " – " & Chr(169) & " – " & $Autor & " – " & $TimeNow

 

MsgBox(0, $Copyright, "Anzeigetext:") 

 

MsgBox(0, $Copyright, StringTrimRight(@ScriptName,4) & " wird von " & $Autor & " zur Verfügung gestellt." _

       & @CRLF & "Version: "        & @TAB & $Version _

       & @CRLF & "vom: "        & @TAB & $Date _

 

autoit Syntax Arrays

#include <Array.au3>


 

1-dimensionales Array:

Global $array[5] = [4,’a‘,’b‘,’c‘,’d‘]

_ArrayDisplay($array,"Array Inhalt")

 

 

 

1-dimensionales Array ohne vorherige Definition der Elemente:

 

local $aArray[0]

 

_ArrayAdd($aArray,"Zeile 1")

_ArrayAdd($aArray," ")

_ArrayAdd($aArray,"Zeile 2")

_ArrayAdd($aArray," ")

_ArrayAdd($aArray,"Zeile 3")

_ArrayAdd($aArray," ")

_ArrayAdd($aArray,"Zeile 4")

 

 


 

2-dimensionales Array:

Global $array[5][2] = [[4,4],[1,’a‘],[2,’b‘],[3,’c‘],[4,’d‘]]

_ArrayDisplay($array,"Array Inhalt")

 

 

 

Beispielscript:

       #include <Array.au3>

 

       Local        $aListe[1][6]

       $aListe[0][0] = "1"

       $aListe[0][1] = "A"

       $aListe[0][2] = "B"

       $aListe[0][3] = "C"

       $aListe[0][4] = "D"

       $aListe[0][5] = "E"

 

       MsgBox(64,"DEBUG","Zeile 1 – Spalte 0: " & $aListe[0][0] _

               & @CRLF & "Zeile 1 – Spalte 1: " & $aListe[0][1] _

               & @CRLF & "Zeile 1 – Spalte 2: " & $aListe[0][2] _

               & @CRLF & "Zeile 1 – Spalte 3: " & $aListe[0][3] _

               & @CRLF & "Zeile 1 – Spalte 4: " & $aListe[0][4] _

               & @CRLF & "Zeile 1 – Spalte 5: " & $aListe[0][5] _

               )

 

              

 

       _ArrayDisplay($aListe,"Liste")

              

 

 

       Local $aZeile = "|a|b|c|d|e"

       for $i = 1 to 5

               _ArrayAdd($aListe,$i & $aZeile,0,"|")

       Next

 

 

       _ArrayDisplay($aListe,"Liste")

              

       Exit

 

 

 


 

Anzahl der Elemente in einem Array:

$array = [‚a‘,’b‘,’c‘,’d‘]                (4 Elemente; $array[0] = ‚a‘; $array[3] = 'd')

$ArraySize = Ubound($array)

$ArraySize: beträgt 4 (wobei der höchste Index um 1 niedriger ist; $array[3] enthält den letzten Wert)

 


 

Array als Tabelle mit Sonderfunktion für markierte Zeile anzeigen:

Local $JavaVersion[9][4]

Global $Line[4]

Local $hUserFunction = _UninstallJavaVersion

 

_ArrayDisplay($JavaVersion,"installierte Java Versionen","1:" & $id & "|0:4",4,";","Nr.|Version|bit|Uninstall-Key","","",$hUserFunction)

 

Func _UninstallJavaVersion($Array,$Line)

;~        _ArrayDisplay($Line)

       $Doit = MsgBox(3,"Uninstall this Java Version","Soll diese java Version jetzt wirklich deinstalliert werden?" & @crlf & @crlf & "v" & $JavaVersion[$Line[1]][1] & “ – “ & $JavaVersion[$Line[1]][2] & „bit  –  “ & $JavaVersion[$Line[1]][3])

       if $Doit = 6 Then

               MsgBox(0,"Diese Java Version","Diese Java Version " & @crlf & @crlf & "v" & $JavaVersion[$Line[1]][1] & “ – “ & $JavaVersion[$Line[1]][2] & „bit  –  “ & $JavaVersion[$Line[1]][3]  & @crlf & @crlf &  "  wird nun deinstalliert…")

               runwait("MsiExec.exe /X" & $JavaVersion[$Line[1]][3])

       Else

               MsgBox(0,"Diese Java Version","v" & $JavaVersion[$Line[1]][1] & “ – “ & $JavaVersion[$Line[1]][2] & „bit  –  “ & $JavaVersion[$Line[1]][3] & @CRLF & "  wird NICHT deinstalliert…")

       EndIf

EndFunc                ; _UninstallJavaVersion($Array,$Line)

 

 


 

autoit Syntax aktuelles Verzeichnis

aktueller Pfad:

       Local $sCurrentPath        = @ScriptDir

 

1. Methode:

while StringInStr($sCurrentPath,"\",0,1)

       $sCurrentPath = StringTrimLeft($sCurrentPath,StringInStr($sCurrentPath,"\",0,1))

WEnd

MsgBox(0,"DEBUG -1-","@ScriptDir: " & @ScriptDir & @CRLF & "current Dir: " & $sCurrentPath, 10)

 

 

2. Methode:

#include <Array.au3>

$aDirectory = StringSplit(@ScriptDir,"\")

; _ArrayDisplay($aDirectory, "aktuelles Verzeichnis")

$sDir = $aDirectory[$aDirectory[0]]

MsgBox(0,"DEBUG -2-","@ScriptDir: " & @ScriptDir & @CRLF & "current Dir: " & $sDir, 10)

 

 

autoit Syntax & – * /

mit {$StringVariable}&="STRING" kann man Zeichenketten zu bestehenden Variablen hinzufügen:

 

z.B.:

$String = "1. Zeile"

 

$String&= @CRLF & "2. Zeile"

$String&= @CRLF & $String

 

MsgBox(0,"Info",$String)

 

Ergebnis:

1. Zeile

2. Zeile

1. Zeile

2. Zeile

 

Hinweis:        {$StringVariable}& = "STRING" funktioniert NICHT!

kein Leerzeichen zwischen & und =

 


 

ebenso kann man zu Zahlen einen Wert addieren:

 

z.B.:

$Zahl = 1

 

$Zahl+= 2

$Zahl+= 0.5

$Zahl+= $Zahl

 

MsgBox(0,"Info",$Zahl)

Ergebnis:        7

       

Hinweis:        {$ZahlVariable}+ = Zahl funktioniert NICHT!

kein Leerzeichen zwischen + und =

 


 

ebenso kann man so subtrahieren:

 

z.B.:

$Zahl = 8

 

$Zahl-= 2

$Zahl-= 2

 

 

MsgBox(0,"Info",$Zahl)

Ergebnis:        4

 


 

ebenso kann man so multiplizieren:

 

z.B.:

$Zahl = 1

 

$Zahl*= 2

$Zahl*= 2

 

 

MsgBox(0,"Info",$Zahl)

Ergebnis:        4

 


 

ebenso kann man so dividieren:

 

z.B.:

$Zahl = 8

 

$Zahl/= 2

$Zahl/= 2

 

 

MsgBox(0,"Info",$Zahl)

Ergebnis:        2

 


 

Im Gegensatz zu anderen Programmiersprachen funktioniert $Zahl++ nicht.

 

Language IDs

Language IDs

ID Language
1025 Arabic
1041 Japanese
1028 Chinese – Traditional
1042 Korean
1029 Czech
1043 Dutch
1030 Danish
1044 Norwegian
1031 German
1045 Polish
1032 Greek
1046 Portuguese – Brazilian
1033 English
1049 Russian
1034 Spanish
1053 Swedish
1035 Finnish
1054 Thai
1036 French
1055 Turkish
1037 Hebrew
2052 Chinese – Simplified
1038 Hungarian
2070 Portuguese
1040 Italian
3076 Chinese – Hong Kong SAR 

Scite4Autoit Abkürzungsliste

Scite4Autoit Abkürzungsliste

Quelle:    http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/SciTE4AutoIt3-AbbreviationList.html

Self Expanding Abbreviations Reference

Abk. Expansion

AutoIt functions  

as Assign()
aso AutoitSetOption()
awgt AutoitWinGetTitle()
awst AutoitWinSetTitle()
ba BitAND()
bi BlockInput()
bin Binary()
binl BinaryLen()
binm BinaryMid()
bn BitNOT()
bo BitOR()
bro BitRotate()
bre Break()
bs BitShift()
bx BitXOR()
ccl ControlClick()
cco ControlCommand()
cd ControlDisable()
cdt CDTray()
ce ControlEnable()
ceil Ceiling()
cf ControlFocus()
cg ClipGet()
cgf ControlGetFocus()
cgh ControlGetHandle()
cgp ControlGetPos()
cgt ControlGetText()
ch ControlHide()
clv ControlListView()
cm ControlMove()
cp ClipPut()
cr ConsoleRead()
cs ControlSend()
csh ControlShow()
cst ControlSetText()
cw ConsoleWrite(| & @LF)
cwr ConsoleWrite("! |" & @LF)
cwg ConsoleWrite("+ |" & @LF)
cwb ConsoleWrite("> |" & @LF)
cwo ConsoleWrite("- |" & @LF)
cwe ConsoleWriteError(| & @LF)
dco DirCopy()
dcr DirCreate()
dgd DriveGetDrive()
dgfs DriveGetFileSystem()
dgl DriveGetLabel()
dgsi DriveGetSize()
dgse DriveGetSerial()
dgt DriveGetType()
dll DllCall()
dllc DllClose()
dllo DllOpen()
dllsc DllStructCreate()
dllsgd DllStructGetData()
dllsgp DllStructGetPtr()
dllsgs DllStructGetSize()
dllssd DllStructSetData()
dm DirMove()
dma DriveMapAdd()
dmd DriveMapDel()
dmg DriveMapGet()
dr DirRemove()
ds DriveStatus()
dsf DriveSpaceFree()
dsl DriveSetLabel()
dst DriveSpaceTotal()
eg EnvGet()
es EnvSet()
eu EnvUpdate()
exec Execute()
fcd FileChangeDir()
fcl FileClose()
fcnl FileCreateNTFSLink()
fco FileCopy()
fcs FileCreateShortcut()
fd FileDelete()
fe FileExists()
ffff FileFindFirstFile()
ffnf FileFindNextFile()
fga FileGetAttrib()
fgln FileGetLongName()
fgsh FileGetShortcut()
fgsi FileGetSize()
fgsn FileGetShortName()
fgt FileGetTime()
fgv FileGetVersion()
fi FileInstall()
flo Floor()
fm FileMove()
fo FileOpen()
fod FileOpenDialog()
fr FileRead()
frc FileRecycle()
frce FileRecycleEmpty()
frl FileReadLine()
fsa FileSetAttrib()
fsd FileSaveDialog()
fsf FileSelectFolder()
fsp FtpSetProxy()
fst FileSetTime()
fw FileWrite()
fwl FileWriteLine()
gc GUICreate()
gcca GUICtrlCreateAvi()
gccb GUICtrlCreateButton()
gcccb GUICtrlCreateCheckbox()
gcccm GUICtrlCreateContextMenu()
gccda GUICtrlCreateDate()
gccdu GUICtrlCreateDummy()
gcce GUICtrlCreateEdit()
gccg GUICtrlCreateGroup()
gccgc GUICtrlCreateGroup('', -99, -99, 1, 1); Close group.
gccgr GUICtrlCreateGraphic()
gcci GUICtrlCreateInput()
gccico GUICtrlCreateIcon()
gccla GUICtrlCreateLabel()
gccli GUICtrlCreateList()
gccm GUICtrlCreateMenu()
gccmc GUICtrlCreateMonthCal()
gccmi GUICtrlCreateMenuItem()
gccco GUICtrlCreateCombo()
gcco GUICtrlCreateObject()
gccpi GUICtrlCreatePic()
gccpr GUICtrlCreateProgress()
gccr GUICtrlCreateRadio()
gccs GUICtrlCreateSlider()
gcct GUICtrlCreateTab()
gccti GUICtrlCreateTabItem()
gcctic GUICtrlCreateTabItem('') ; Close tabitem.
 |
gcctv GUICtrlCreateTreeView()
gcctvi GUICtrlCreateTreeViewItem()
gccu GUICtrlCreateUpdown()
gcd GUICtrlDelete()
gcgh GUICtrlGetHandle()
gcgs GUICtrlGetState()
gcr GUICtrlRead()
gcrlvs GUICtrlRegisterListViewSort()
gcrm GUICtrlRecvMsg()
gcsbc GUICtrlSetBkColor()
gcsco GUICtrlSetColor()
gcscu GUICtrlSetCursor()
gcsd GUICtrlSetData()
gcsf GUICtrlSetFont()
gcsgr GUICtrlSetGraphic()
gcsi GUICtrlSetImage()
gcsl GUICtrlSetLimit()
gcsm GUICtrlSendMsg()
gcsoe GUICtrlSetOnEvent()
gcsp GUICtrlSetPos()
gcsr GUICtrlSetResizing()
gcss GUICtrlSetState()
gcsst GUICtrlSetStyle()
gcst GUICtrlSetTip()
gcstd GUICtrlSendToDummy()
gd GUIDelete()
ggci GUIGetCursorInfo()
ggm GUIGetMsg()
grm GUIRegisterMsg()
gsa GUISetAccelerators()
gsbc GUISetBkColor()
gsc GUISetCoord()
gscu GUISetCursor()
gsf GUISetFont()
gsg GUIStartGroup()
gsh GUISetHelp()
gsi GUISetIcon()
gsoe GUISetOnEvent()
gss GUISetState()
gsw GUISwitch()
hks HotKeySet()
hsp httpSetProxy()
ib InputBox()
id IniDelete()
ic InetClose()
ig InetGet()
igi InetGetInfo()
igs InetGetSize()
ir IniRead()
irs IniReadSection()
irsn IniReadSectionNames()
isad IsAdmin()
isar IsArray()
isbin IsBinary()
isbo IsBool()
isd IsDeclared()
isf IsFloat()
ishw IsHWnd()
isi IsInt()
isk IsKeyword()
isn IsNumber()
iso IsObj()
iss IsString()
iw IniWrite()
iws IniWriteSection()
mb MsgBox()
mc MouseClick()
mcd MouseClickDrag()
md MouseDown()
mgc MouseGetCursor()
mgp MouseGetPos()
mgs MemGetStats()
mm MouseMove()
mu MouseUp()
mw MouseWheel()
num Number()
oaer OnAutoItExitRegister("|")
ocr ObjCreate()
oev ObjEvent()
oge ObjGet()
pc ProcessClose()
pcs PixelChecksum()
pe ProcessExists()
pgc PixelGetColor()
pl ProcessList()
poff ProgressOff()
pon ProgressOn()
ps PixelSearch()
pset ProgressSet()
psp ProcessSetPriority()
pw ProcessWait()
pwc ProcessWaitClose()
ra RunAs()
raw RunAsWait()
rd RegDelete()
rdm Random()
rek RegEnumKey()
rev RegEnumVal()
rnd Round()
rr RegRead()
rwa RunWait()
rwr RegWrite()
sacr StringAddCR()
sbgt StatusbarGetText()
sco StringCompare()
sd Shutdown()
se SetError()
ser StdErrRead()
sex SetExtended()
sexec ShellExecute()
sexecw ShellExecuteWait()
sf StringFormat()
sia StringIsAlpha()
sian StringIsAlNum()
siascii StringIsASCII()
sid StringIsDigit()
sif StringIsFloat()
sii StringIsInt()
sil StringIsLower()
sio SplashImageOn()
sioc StdioClose()
sis StringInStr()
sisp StringIsSpace()
siu StringIsUpper()
siw StdInWrite()
sixd StringIsXDigit()
ska SendKeepActive()
sl StringLeft()
slen StringLen()
slower StringLower()
slp Sleep()
sm StringMid()
so SplashOff()
sor StdoutRead()
sp SoundPlay()
sr StringRight()
srep StringReplace()
srex StringRegExp()
srexr StringRegExpReplace()
ss StringSplit()
sscr StringStripCR()
ssws StringStripWS()
sswv SoundSetWaveVolume()
stbin StringToBinary()
stl StringTrimLeft()
sto SplashTextOn()
str StringTrimRight()
stri String()
supper StringUpper()
tci TrayCreateItem()
tcm TrayCreateMenu()
tcpa TCPAccept()
tcpc TCPConnect()
tcpcs TCPCloseSocket()
tcpl TCPListen()
tcpntip TCPNameToIP()
tcpc TCPRecv()
tcps TCPSend()
tcpsd TCPShutdown()
tcpsu TCPStartup()
td TimerDiff()
tgm TrayGetMsg()
ti TimerInit()
tid TrayItemDelete()
tigh TrayItemGetHandle()
tigs TrayItemGetState()
tigt TrayItemGetText()
tisoe TrayItemSetOnEvent()
tiss TrayItemSetState()
tist TrayItemSetText()
toolt ToolTip()
tsc TraySetClick()
tsi TraySetIcon()
tsoe TraySetOnEvent()
tspi TraySetPauseIcon()
tss TraySetState()
tstt TraySetToolTip()
tt TrayTip()
ub UBound()
udpb UDPBind()
udpcs UDPCloseSocket()
udpo UDPOpen()
udpr UDPRecv()
udpsd UDPShutdown()
udpsu UDPStartup()
wa WinActive()
wat WinActivate()
wc WinClose()
we WinExists()
wf WinFlash()
wgcl WinGetClassList()
wgcp WinGetCaretPos()
wgcs WinGetClientSize()
wgh WinGetHandle()
wgpo WinGetPos()
wgpr WinGetProcess()
wgs WinGetState()
wgte WinGetText()
wgti WinGetTitle()
wk WinKill()
wl WinList()
wm WinMove()
wma WinMinimizeAll()
wmau WinMinimizeAllUndo()
wmsi WinMenuSelectItem()
wsot WinSetOnTop()
wss WinSetState()
wst WinSetTitle()
wstr WinSetTrans()
ww WinWait()
wwa WinWaitActive()
wwc WinWaitClose()
wwna WinWaitNotActive()

Variable prefixes 

but $idButton_
chk $idCheckbox_
dat $idDate_
edt $idEdit_
inp $idInput_
lbl $idLabel_
lvw $idListView_
prg $idProgressbar_
rad $idRadio_
sld $idSlider_
tab $idTab_
trv $idTreeview_

Misc Variables 

hnd $handle_
regkey $registry_Key
regval $$registry_Value
regdat $registry_Data
error $error
errval $iErrorValue = @error
|
extval $iExtendedValue = @extended
|
retval $vReturnValue =
iret $iReturn =
aret $aReturn =
bret $bReturn =
dret $dReturn =
vret $vReturn =
result $Result =

CMDLine Functions 

cmdline $CMDLINE[_]

 

cmdlineselect #region – CmdlineSelect
If $CMDLINE[0] Then
    For $i = 1 To $CMDLINE[0]
        Select
            Case $CMDLINE[$i] = '/?'
                MsgBox(0x40000, @ScriptName & ' Help', _
                        'Switches are:' & @CRLF _
                         & @CRLF & '/extract' _
                         & @CRLF & @TAB & 'Extract files to current directory' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '')
                Exit
            Case $CMDLINE[$i] = '/extract'
                FileInstall('x', @ScriptDir & '')
                Exit
            Case $CMDLINE[$i] = '/x'
            Case $CMDLINE[$i] = '/x'
            Case $CMDLINE[$i] = '/x'
            Case $CMDLINE[$i] = '/x'
            Case Else
                MsgBox(0x40000, 'Incorrect switch used', _
                        'Command used:' & @CRLF & $CMDLINERAW & @CRLF & _
                        @CRLF & 'Use /? for the switches available.')
                Exit
        EndSelect
    Next
EndIf
#endregion

 

cmdlineselect2 #region – CmdlineSelect + Properties
If $CMDLINE[0] Then
    For $i = 1 To $CMDLINE[0]
        If StringLeft($CMDLINE[$i], 1) = '/' Then
            Select
                Case $CMDLINE[$i] = '/?'
                    MsgBox(0x40000, @ScriptName & ' Help', _
                            'Switches are:' & @CRLF _
                             & @CRLF & '/extract' _
                             & @CRLF & @TAB & 'Extract files to current directory' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '')
                    Exit
                Case $CMDLINE[$i] = '/extract'
                    FileInstall('x', @ScriptDir & '')
                    Exit
                Case $CMDLINE[$i] = '/x'
                Case $CMDLINE[$i] = '/x'
                Case $CMDLINE[$i] = '/x'
                Case $CMDLINE[$i] = '/x'
                Case Else
                    _CmdlineMsgBox()
            EndSelect
        Else
            Const $PROPERTY = StringSplit($CMDLINE[$i], '=')
            If Not @error Then
                Select
                    Case $PROPERTY[1] = 'x'
                        $x = $PROPERTY[2]
                    Case $PROPERTY[1] = 'x'
                        $x = $PROPERTY[2]
                    Case $PROPERTY[1] = 'x'
                        $x = $PROPERTY[2]
                    Case $PROPERTY[1] = 'x'
                        $x = $PROPERTY[2]
                    Case $PROPERTY[1] = 'x'
                        $x = $PROPERTY[2]
                    Case Else
                        _CmdlineMsgBox()
                EndSelect
            Else
                _CmdlineMsgBox()
            EndIf
        EndIf
    Next
EndIf
Func _CmdlineMsgBox()
    MsgBox(0x40000, 'Incorrect switch used', _
            'Command used:' & @CRLF & $CMDLINERAW & @CRLF & _
            @CRLF & 'Use /? for the switches available.')
    Exit
EndFunc
#endregion

 

cmdlineswitch #region – CmdlineSwitch
If $CMDLINE[0] Then
    For $i = 1 To $CMDLINE[0]
        Switch $CMDLINE[$i]
            Case '/?'
                MsgBox(0x40000, @ScriptName & ' Help', _
                        'Switches are:' & @CRLF _
                         & @CRLF & '/extract' _
                         & @CRLF & @TAB & 'Extract files to current directory' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '' _
                         & @CRLF & '/x' _
                         & @CRLF & @TAB & '')
                Exit
            Case '/extract'
                FileInstall('?', @ScriptDir & '')
                Exit
            Case '/x'
            Case '/x'
            Case '/x'
            Case '/x'
            Case Else
                MsgBox(0x40000, 'Incorrect switch used', _
                        'Command used:' & @CRLF & $CMDLINERAW & @CRLF & _
                        @CRLF & 'Use /? for the switches available.')
                Exit
        EndSwitch
    Next
EndIf
#endregion

 

cmdlineswitch2 #region – CmdlineSwitch + Properties
If $CMDLINE[0] Then
    For $i = 1 To $CMDLINE[0]
        If StringLeft($CMDLINE[$i], 1) = '/' Then
            Switch $CMDLINE[$i]
                Case '/?'
                    MsgBox(0x40000, @ScriptName & ' Help', _
                            'Switches are:' & @CRLF _
                             & @CRLF & '/extract' _
                             & @CRLF & @TAB & 'Extract files to current directory' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '' _
                             & @CRLF & '/x' _
                             & @CRLF & @TAB & '')
                    Exit
                Case '/extract'
                    FileInstall('x', @ScriptDir & '')
                    Exit
                Case '/x'
                Case '/x'
                Case '/x'
                Case '/x'
                Case Else
                    _CmdlineMsgBox()
            EndSwitch
        Else
            Const $PROPERTY = StringSplit($CMDLINE[$i], '=')
            If Not @error Then
                Switch $PROPERTY[1]
                    Case 'x'
                        $x = $PROPERTY[2]
                    Case 'x'
                        $x = $PROPERTY[2]
                    Case 'x'
                        $x = $PROPERTY[2]
                    Case 'x'
                        $x = $PROPERTY[2]
                    Case 'x'
                        $x = $PROPERTY[2]
                    Case Else
                        _CmdlineMsgBox()
                EndSwitch
            Else
                _CmdlineMsgBox()
            EndIf
        EndIf
    Next
EndIf
Func _CmdlineMsgBox()
    MsgBox(0x40000, 'Incorrect switch used', _
            'Command used:' & @CRLF & $CMDLINERAW & @CRLF & _
            @CRLF & 'Use /? for the switches available.')
    Exit
EndFunc
#endregion

Constants for GUICtrlRead 

gchecked $GUI_CHECKED
gunchecked $GUI_UNCHECKED

Constants for GUICtrlState 

genable $GUI_ENABLE
gdisable $GUI_DISABLE
ghide $GUI_HIDE
gshow $GUI_SHOW
gfocus $GUI_FOCUS

Constants for Events 

eclose $GUI_EVENT_CLOSE
emin $GUI_EVENT_MINIMIZE
erestore $GUI_EVENT_RESTORE
emax $GUI_EVENT_MAXIMIZE

PreSelected Commands  

cmd RunWait(@ComSpec & ' /c |', '', @SW_HIDE)
slp1 Sleep(1000)
slp2 Sleep(2000)
slp3 Sleep(3000)
slp4 Sleep(4000)
slp5 Sleep(5000)

GUI Common Prefixes to Functions 

gcc GUICtrlCreate
gcs GUICtrlSet

Macros  

cr1  & @CRLF
cr2  & @CRLF & @CRLF
cr3  & @CRLF & @CRLF & @CRLF
cr4  & @CRLF & @CRLF & @CRLF & @CRLF
cr5  & @CRLF & @CRLF & @CRLF & @CRLF & @CRLF
tab1  & @TAB
tab2  & @TAB & @TAB
tab3  & @TAB & @TAB & @TAB
tab4  & @TAB & @TAB & @TAB & @TAB
tab5  & @TAB & @TAB & @TAB & @TAB & @TAB
lf1  & @LF
lf2  & @LF & @LF
lf3  & @LF & @LF & @LF
lf4  & @LF & @LF & @LF & @LF
lf5  & @LF & @LF & @LF & @LF & @LF

Keywords  

cl ContinueLoop
el ExitLoop
err @Error
ext @Extended

Directives  

include #include <|.au3>
incl #include <|.au3>
incll #include "|.au3"
includeonce #include-once
|
incl1 #include-once
|
prag #pragma compile(|,)
reg2 #Region – |
#EndRegion
reg #Region – |
ereg #EndRegion
|
nti #NoTrayIcon
|
oasr #OnAutoItStartRegister "|"

@error handling 

iferrext If @error Then Return SetError(@error, @extended, '|')
 
iferrext2 If @error Then Return SetError(@error, @extended, '|')
  ;  Return SetError(@error , @extended , "|" )
> Else
    EndIf
 
iferrmsg If @error Then MsgBox($MB_ICONERROR, '|', _
      '@error = ' & @error & @CRLF & '@extended = ' & @extended)
 
switcherr Switch @error
    Case  |
    Case  
    Case  
    Case  
Case Else  
EndSwitch
 

Multiline Structures 

ifthen If  | Then
EndIf
ifelse If  | Then
Else
EndIf
ifelseif If  | Then
ElseIf
Else
EndIf
dountil Do
    |
Until
fornext For $i = | To Step 1
Next
fun Func _|()
EndFunc
 
funex _Example()
Func _Example()
    |
EndFunc
 
selectcase Select
    Case |
    Case
    Case
    Case
    Case Else
EndSelect
more     Case |
    Case
    Case
    Case
    Case Else 
whilewend While |
WEnd

Start of Structures

for0 For $i = 0 To |
for1 For $i = 1 To |
for0ub For $i = 0 To UBound(|) -1
for1ub For $i = 1 To UBound(|) -1

Setup GUI  

setupgui #include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

 

#region – GUI Create
GUICreate(|)

GUISetState(@SW_SHOW)
#endregion

selectloop

functions

selectloop #Region – GUI SelectLoop
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = |
        Case $msg =
        Case $msg =
        Case $msg =
    EndSelect
WEnd
#EndRegion
moremsg |
Case $msg =    
Case $msg =
Case $msg =
Case $msg =
Case $msg =
functions ; Start – Functions

 

Func _A|()
EndFunc

Func _B()
EndFunc

Func _C()
EndFunc

Func _D()
EndFunc

Func _E()
EndFunc

Func _F()
EndFunc

Func _G()
EndFunc

Func _H()
EndFunc

Func _I()
EndFunc

Func _J()
EndFunc

Say Function 

say Func _Say($sText, $iRate = 1, $iVolume = 100)
    If $iRate > 10 Or $iVolume > 100 Then Return
    Local $oTalk = ObjCreate('SAPI.SpVoice')
    If Not @error Then
        $oTalk.Rate = $iRate
        $oTalk.Volume = $iVolume
        $oTalk.Speak($sText)
    EndIf
EndFunc

SelfDelete function  

selfdelete Func _SelfDelete($iDelay = 0)
    Local $sCmdFile
    FileDelete(@TempDir & "\scratch.bat")
    $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _
            & ':loop' & @CRLF _
            & 'del "' & @ScriptFullPath & '" > nul' & @CRLF _
            & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
            & 'del ' & @TempDir & '\scratch.bat'
    FileWrite(@TempDir & "\scratch.bat", $sCmdFile)
    Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE)
EndFunc

AutoIt3Wrapper Directives 

a3w

 

a3w2

#Region AutoIt3Wrapper Directives
#AutoIt3Wrapper_UseX64=
#AutoIt3Wrapper_Version=
#AutoIt3Wrapper_Run_Debug_Mode=
#AutoIt3Wrapper_Run_SciTE_Minimized=
#AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized=
#AutoIt3Wrapper_Icon=
#AutoIt3Wrapper_OutFile=
#AutoIt3Wrapper_OutFile_Type=
#AutoIt3Wrapper_Compression=
#AutoIt3Wrapper_UseUpx=
#AutoIt3Wrapper_UPX_Parameters=
#AutoIt3Wrapper_Change2CUI=
#AutoIt3Wrapper_Res_Comment=
#AutoIt3Wrapper_Res_Description=
#AutoIt3Wrapper_Res_Fileversion=
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=
#AutoIt3Wrapper_Res_ProductVersion=
#AutoIt3Wrapper_Res_Language=
#AutoIt3Wrapper_Res_LegalCopyright=
#AutoIt3Wrapper_Res_requestedExecutionLevel=
#AutoIt3Wrapper_Res_SaveSource=
#AutoIt3Wrapper_Res_Field=
#AutoIt3Wrapper_Res_Field=
#AutoIt3Wrapper_Res_Field=
#AutoIt3Wrapper_Res_Icon_Add=
#AutoIt3Wrapper_Res_Icon_Add=
#AutoIt3Wrapper_Res_File_Add=
#AutoIt3Wrapper_Res_File_Add=
#AutoIt3Wrapper_Run_Tidy=
#AutoIt3Wrapper_Tidy_Stop_OnError=
#Tidy_Parameters=
#AutoIt3Wrapper_Run_Au3Stripper=
#Au3Stripper_Parameters=
#AutoIt3Wrapper_Run_AU3Check=
#AutoIt3Wrapper_AU3Check_Parameters=
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=
#AutoIt3Wrapper_PlugIn_Funcs=
#AutoIt3Wrapper_Versioning=
#AutoIt3Wrapper_Versioning_Parameters=
#AutoIt3Wrapper_Run_Before=
#AutoIt3Wrapper_Run_After=
#AutoIt3Wrapper_Add_Constants=
#EndRegion

Options  

options #Region – Options|
;~ Opt('CaretCoordMode', 0)
;~ Opt('ExpandEnvStrings', 1)
;~ Opt('ExpandVarStrings', 1)
;~ Opt('FtpBinaryMode', 0)
;~ Opt('GUICloseOnESC', 0)
;~ Opt('GUICoordMode', 2)
;~ Opt('GUIDataSeparatorChar', '')
;~ Opt('GUIEventOptions', 1)
;~ Opt('GUIOnEventMode', 1)
;~ Opt('GUIResizeMode', 1)
;~ Opt('MouseClickDelay', 10)
;~ Opt('MouseClickDownDelay', 10)
;~ Opt('MouseClickDragDelay', 250)
;~ Opt('MouseCoordMode', 0)
;~ Opt('MustDeclareVars', 1)
;~ Opt('PixelCoordMode', 0)
;~ Opt('SendAttachMode', 1)
;~ Opt('SendCapslockMode', 0)
;~ Opt('SendKeyDelay', 5)
;~ Opt('SendKeyDownDelay', 1)
;~ Opt('TCPTimeout', 100)
;~ Opt('TrayAutoPause', 0)
;~ Opt('TrayIconDebug', 1)
;~ Opt('TrayIconHide', 1)
;~ Opt('TrayMenuMode', 1)
;~ Opt('TrayOnEventMode', 1)
;~ Opt('WinDetectHiddenText', 1)
;~ Opt('WinSearchChildren', 1)
;~ Opt('WinTextMatchMode', 4)
;~ Opt('WinTitleMatchMode', 4)
;~ Opt('WinWaitDelay', 250)
#EndRegion

Setup UDF header  

setupudf    
; #FUNCTION# ============================================
; Name………..:
; Description …:
; Syntax………:
; Parameters ….:
; Return values .:
; Author ……..:
; Modified…….:
; Remarks …….:
; Related …….:
; Link ……….:
; Example …….:
; ======================================================


 

Script switches  

aes /AutoIt3ExecuteScript
ael /AutoIt3ExecuteLine
raes Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & | & '"')
rwaes RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & | & '"')
rael Run('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & | & '"')
rwael RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteLine "' & | & '"')