TalksWithComputers
Joined: 16 Aug 2009 Posts: 20
|
Posted: Sat Dec 12, 2009 2:44 pm Post subject: Problem with using self-defined environment variable |
|
|
Hi
I need to append e-mail addresses to a file in a directory on several computers.
I have created on all these computers an environment variable called "Magic Briefcase" so I can run the same script on all of them.
But I can't find out how to call the environment variable from within AutoHotkey.
The Variables and Expressions reference only lists existing environment variables like "A_Temp".
Is it possible to get sth like A_Magic_Briefcase? %A_Magic_Briefcase% does not work...
So, here's the code:
| Code: | Send ^c ; E-Mail-Adresse auswählen und kopieren
ClipWait ; Warten, bis Zwischenablage voll ist.
EMA := Clipboard
Gui, Add, Edit, x196 y107 w240 h30 , Edit
Gui, Add, Text, x36 y47 w130 h30 , E-Mail-Adresse:
Gui, Add, Text, x196 y47 w230 h30 , %EMA%
Gui, Add, Text, x36 y107 w130 h30 , Bemerkung
Gui, Add, Button, x36 y187 w100 h40 +Checked gOK, OK
Gui, Add, Button, x196 y187 w100 h40 gCancel, Abbrechen
; Generated using SmartGUI Creator 4.0
Gui, Show, w477 h259, Neue E-Mail-Adresse erfassen
Return
Cancel:
GuiClose:
ExitApp
OK:
FileAppend `n%EMA%, C:\Dokumente und Einstellungen\Administrator\Eigene Dateien\Magic Briefcase\E-Mail-Adressen.txt ; gilt!!!
;~ FileAppend `n %EMA%, %A_Magic_Briefcase%\Magic Briefcase\E-Mail-Adressen.txt
ExitApp |
Your help is appreciated! |
|