Search, Activate srt

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

Search, Activate srt

Post by jj45410 » Thu Dec 04, 2008 8:39 pm

Ok, I was wondering if there was a way to make a menu like a search bar, and then you type in the name of a subroutine like
SRT>Start Itunes
ExecuteFile>C:\Documents and Settings\Jordan\Desktop\iTunes\iTunes Library.itl,
END>Start Itunes
and it would run that subroutine.. So actually it would be like Start -> Run but MS style and custom made :)) Thank you.

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Dec 04, 2008 9:20 pm

I think you want the MainMenu object in a dialog. Look up dialog in help then look at MainMenu.

jj45410
Junior Coder
Posts: 38
Joined: Tue Nov 18, 2008 8:14 pm

Post by jj45410 » Fri Dec 05, 2008 9:26 pm

lol Thank you, but I need an example script, I cannot just read it.. I need a script to look at and see how it works. The help ones are not detailed enough in my opinon.

User avatar
JRL
Automation Wizard
Posts: 3518
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Fri Dec 05, 2008 11:30 pm

No guarantees that the apps on your computer are in the same locations as the apps on my computer.

Code: Select all

Dialog>Dialog1
   Caption=MainMenu Sample
   Width=200
   Height=50
   Top=10
   Left=CENTER
   MainMenu=Browsers,FireFox(101),IExplorer(102)
   MainMenu=Apps,NotePad(201),WordPad(202),Paint(203)
EndDialog>Dialog1
show>Dialog1

Label>Loop
GetDialogAction>Dialog1,res1
If>res1=2
  Exit>
EndIf
If>res1=101
  Run>C:\Program Files\Mozilla Firefox\FireFox.exe
  ResetDialogAction>dialog1
EndIf
If>res1=102
  Run>C:\Program Files\Internet Explorer\IExplore.exe
  ResetDialogAction>dialog1
EndIf
If>res1=201
  Run>NotePad.exe
  ResetDialogAction>dialog1
EndIf
If>res1=202
  Run>C:\Program Files\Windows NT\Accessories\wordpad.exe
  ResetDialogAction>dialog1
EndIf
If>res1=203
  Run>%Win_dir%\System32\mspaint.exe
  ResetDialogAction>dialog1
EndIf
Wait>0.01
Goto>Loop

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts