Here is the code:
Code: Select all
Dialog>Dialog2
Caption=Auto Pot
Width=445
Height=315
Top=97
Left=16
Button=Quick Log,8,176,233,33,3
Button=Exit,8,216,233,33,4
Button=Launch Soma,8,8,233,73,5
Button=Start Auto HP,152,88,89,33,1
Button=Start Auto MP,152,136,89,33,6
Label=Number of HP Pots : ,0,96
Edit=txtHP,104,96,42,
Edit=txtMP,104,144,42,
Label=Number of MP Pots : ,0,144
Button=Test,308,39,75,25,8
EndDialog>Dialog2
Label>MainLoop
Show>Dialog2,result
if>result=1,StartAutoHP
if>result=2,Main
if>result=3,QuickLog
if>result=4,End
if>result=5,LaunchSoma
if>result=6,StartAutoMP
if>result=7,Main
if>result=8,TestFeature
Goto>MainLoop
SRT>TestFeature
MessageModal>Dialog2.txtHP
END>TestFeature
SRT>LaunchSoma
RunProgram>C:\Soma\SomaDev Launcher.exe
WaitWindowOpen>SomaDev Launcher 1.1
SetFocus>SomaDev Launcher 1.1
Press Tab
Press Enter
WaitWindowOpen>Soma Mythological Biography
MoveWindow>Soma Mythological Biography,474,1
SetFocus>Soma Mythological Biography
END>LaunchSoma
SRT>QuickLog
CloseWindow>Soma Mythological Biography
END>QuickLog
SRT>StartAutoHP
Let>HPPots=Dialog2.txtHP
Show>Dialog2
SetFocus>Soma Mythological Biography
Repeat>HPPots
Wait>1
WaitPixelColor>10856101,506,530,0
Press F4
HPPots=HPPots-1
Until>HPPots=0
Message>No HP Pots Left
END>StartAutoHP
SRT>StartAutoMP
Let>MP=0
Show?>Dialog
SetFocus>Soma Mythological Biography
Repeat>MP
Wait>1
WaitPixelColor>9211532,528,528,1
Press F3
Until>MP=10
END>StartAutoMP
Label>End
- In the AutostartHP function, I am trying to make it so that I can type in the number of pots I have in a textbox in the dialog, then each time the loop goes through one cycle, subtract 1 from the value, then when the value reaches 0 I want it to go to SRT>quicklog.
- I also would like to make a button that stops the script and go back to the mainloop, but all attempts have been unsuccesful, im sure this isnt that hard to do...
- One last thing,when I compile and try to run the exe I always get the following error message:

If anyone can help me out with this it would be great.