AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

popup window for short scripts

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
WileECoyote



Joined: 04 Nov 2005
Posts: 9

PostPosted: Tue Nov 22, 2005 2:01 pm    Post subject: popup window for short scripts Reply with quote

a small script which opens an edit window and executes the contents as ahk script. remembers the contents for the next activation. using a hotkey to launch the script lets you do virtually anything by just typing in the right commands.

christian

Code:

FileRead, COMMAND, %TEMP%\execute!.ahk
if ErrorLevel <> 0
   COMMAND=SoundPlay, %SystemRoot%\Media\ding.wav, wait

Gui, add, text,, Code to execute:
Gui, Add, Edit, r9 vMyEdit, %COMMAND%
Gui, add, button, default, &Execute  ; The label ButtonExecute (if it exists) will be run when the button is pressed.
Gui, add, button, X+15, &Cancel
Gui, show,, AutoHotkey Code Execution
return  ; End of auto-execute section. The script is idle until the user does something.

ButtonExecute:
Gui, submit  ; Save the input from the user to each control's associated variable.

FileDelete, %TEMP%\execute!.ahk
FileAppend, %MyEdit%, %TEMP%\execute!.ahk
Run, %TEMP%\execute!.ahk

GuiClose:
ButtonCancel:
ExitApp
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Tue Nov 22, 2005 11:23 pm    Post subject: Reply with quote

So simple! Thanks for posting it. I just hid the buttons and added your script to my main one. Now, if I need to know how many days are between two dates, I just fire the GUI and type
Code:
d = 20050611
d-= 20041212,days
MsgBox % d
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group