Schlagwort-Archive: syntax

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 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)