1) take all the pictures in this folder, and make a powerpoint presentation with filenames ac captions
2) take all these files and add an extension (changing mac files to PC files)
I also use some scripts I found on this forum, Seek, etc.
It was getting to the point that I needed a good launcher, so I wrote this, which people may find interesting:
; ; Language: English ; Platform: Win9x/NT ; Author: engunneer _AT_ gmail.com ; ; Script Function: ; Show list of autohotkey scripts available in subfolders, run the selection and quit. ; Ignore self if possible. Loop, complete\*.exe, 0, 1 ;look for all exes to run { ;get variables highestindex = %A_index% exename%A_Index% = %A_LoopFileName% exepath%A_Index% = %A_LoopFileLongPath% exeactive%A_Index% = Inactive Process, Exist, %A_LoopFileName% If ErrorLevel <> 0 { ;MsgBox, %A_LoopFileName% is running already. exeactive%A_Index% = Active } StringTrimRight, descfilepath, A_LoopFileFullPath, 3 descfilepath = %A_WorkingDir%\%descfilepath%txt ;get description file if it exists textofdesc = none IfExist, %descfilepath% FileReadLine, textofdesc, %descfilepath%, 1 exedesc%A_Index% = %textofdesc% } loop, %highestindex% ;build GUI from scripts { filename := exename%A_Index% filepath := exepath%A_Index% filestat := exeactive%A_Index% filedesc := exedesc%A_Index% ;MsgBox, Name: %filename%`nPath: %filepath%`nStatus: %filestat%`nDescription: %filedesc% Gui, Add, Button, xm gButtonRun%A_index%, %A_index% Gui, Add, Text, x40 yp+0, %filename% Gui, Add, Text, x140 yp+0, %filestat% Gui, Add, Text, x200 yp+0, %filedesc% } Gui, Add, Button, default, OK ; The label ButtonOK will be run when the button is pressed. Gui, Show,, Choose your script return ; End of auto-execute section. The script is idle until the user does something. GuiCancel: GuiClose: Gui, Submit ; Save the input from the user to each control's associated variable. ExitApp ButtonOK: Gui, Submit ; Save the input from the user to each control's associated variable. ExitApp ButtonRun1: Run, %exepath1% ;run whatever the first item was ExitApp Return ButtonRun2: Run, %exepath2% ExitApp Return ButtonRun3: Run, %exepath3% ExitApp Return ButtonRun4: Run, %exepath4% ExitApp Return ButtonRun5: Run, %exepath5% ExitApp Return ButtonRun6: Run, %exepath6% ExitApp Return ButtonRun7: Run, %exepath7% ExitApp Return ButtonRun8: Run, %exepath8% ExitApp Return ButtonRun9: Run, %exepath9% ExitApp Return
Usage:
- Create a folder with this script in it. I call mine Documents\projects\scripts\completed
- Create subfolders for each script you write. For me, the only exe files in the folder are completed scripts.
- Create a desctiption file for each script. for example, my powerpoint script is ..\completed\powerpointer\powerpointer.exe and the description file is \completed\powerpointer\powerpointer.txt
I know ther is alot to clean up here, but the biggest problem I have is the labels ButtonRunX, where X is the number of the button you hit. I am limited to 9 scripts right now, but I eventually would want to expand it. Can it generate the labels directly? I think I would need the equivalent of:
{pseudocode - snip} loop, all EXE files { ... Gui, Add, Button, gRunProgram {indexvariable = %A_index%}, %A_index% ... } ... RunProgram: Run, %program%%indexvariable% ...
The part I can't figure out is {indexvariable = %A_index%}. Can I set a variable when a button is pushed? Or should I use GuiControlGet, variable, Focus?