Rahul Rohela Posted June 14, 2006 Posted June 14, 2006 Hi, My query how to identify that script is over or complete its work. Visually i can see that work is over... but i just want add one message box or label to the script that will show message FINISHED... As under one script i am using more than one Stages of calculations.. These stages are dependent to one another & one loop could end at any stage... So i have no clue that script is over or not... or you can say that i have no way to display message that script finished its work... Any idea.. Please help...
.Matt Posted June 14, 2006 Posted June 14, 2006 Add this to the end MsgBox ( 1, "MY 31337 ScripT is Teh FiNiSHzorzz")
forger Posted June 14, 2006 Posted June 14, 2006 .matt 's "31337" solution results to an error The right coding would be: MsgBox(0, "This is a title", "This is the text you want") or use a sound: SoundPlay(@WindowsDir & "\media\ding.wav",1) Both explained in AutoIt's help file (Look for them under the Index tab)
Rahul Rohela Posted June 14, 2006 Author Posted June 14, 2006 Add this to the end MsgBox ( 1, "MY 31337 ScripT is Teh FiNiSHzorzz") At what End... My script is something like this Do Some logic _a() Until this = this Func _a() -------------------------- -------------------- Logic--- IF something true then _b() Else Exitloop End Func Func _b() -------------------------- -------------------- Logic--- IF something true then _c() Else Exitloop End Func Func _c() -------------------------- -------------------- Logic--- IF something true then ---Some function Else Exitloop End Func In script like this where to to put this... as logic could ens at any Finction like A, B & C... depends upon conditions & loop will processed again & again UNTIL statments comes true... and when statement comes true this will process functions too.. I hope its clear now
Thatsgreat2345 Posted June 14, 2006 Posted June 14, 2006 could you post your entire script, cuz ur using like exitloops with out any loops and yeah
forger Posted June 14, 2006 Posted June 14, 2006 (edited) At what End... Each function ends somewhere. Wherever you want a message that one stage is finished, you can either put it at the end of the function (one line *before* EndFunc) or after you call the function(one line *after* the call)You kind of answered that yourself:but i just want add one message box or label to the script that will show message FINISHED... Edited June 14, 2006 by forger
Rahul Rohela Posted June 14, 2006 Author Posted June 14, 2006 Each function ends somewhere. Wherever you want a message that one stage is finished, you can either put it at the end of the function (one line *before* EndFunc) or after you call the function(one line *after* the call)You kind of answered that yourself:Script is working for 30 -40 min depends upon data... Its easy to display message after completion of every function... but i dont want to display message after every function... i want to display only final message..For example script is calculation some values depending upon one initial vale to final vale ... Initially values ranges form 10 to 100.. or more ... so for each vale all functions are called... i mean form fist to last value all functions are repeated until last vale....So i want to display message only after last vale got processed ...
Thatsgreat2345 Posted June 14, 2006 Posted June 14, 2006 (edited) Final("57") Func Final($value) If $value >= 10 and $value <= 100 then Msgbox(0,"Script","Script is Done") Else Return Endif EndFunc just send the function with the number variable and yeah tuh duh if the value is greater then or equal to 10 and less then or equal to 100 then it will display the message Edited June 14, 2006 by thatsgreat2345
herewasplato Posted June 14, 2006 Posted June 14, 2006 DoSome logic _a()Until this = this;;;;;final msgbox goes here;;;;;Func _a()----------------------------------------------Logic---IF something true then_b()ElseExitloopEnd Func<snipped>You showed no exits inside any of the functions - the psuedo code mentioned will either loop forever or "end" after the until. It is only code - just try the msgbox there. Turn on TrayIconDebug and use traytips inside each function to debug,,, [size="1"][font="Arial"].[u].[/u][/font][/size]
herewasplato Posted June 14, 2006 Posted June 14, 2006 ... and when statement comes true this will process functions too...not with the code that you posted. When the Until is true, the script will end - again, just try it. [size="1"][font="Arial"].[u].[/u][/font][/size]
jvanegmond Posted June 14, 2006 Posted June 14, 2006 (edited) If you want a message box to appear when you exit, just write a function named OnAutoItExit with a msgbox in it and you're good to go. Alternately, paste a msgbox code before every 'exit' command and at the last line. My query how to identify that script is over or complete its work. From what i understand is you're trying to make 2 scripts interact? For that i would suggest RegWrite and RegRead. [edit] Typo Edited June 14, 2006 by Manadar github.com/jvanegmond
nfwu Posted June 14, 2006 Posted June 14, 2006 (edited) I recommend not to mess with the registry... better keep him out of it before he hurts himself... Try out StdinWrite, StdoutRead, ConsoleWrite and ConsoleRead #) edit: also IniRead & IniWrite Edited June 14, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Rahul Rohela Posted June 14, 2006 Author Posted June 14, 2006 DoSome logic _a()Until this = this;;;;;final msgbox goes here;;;;;Func _a()----------------------------------------------Logic---IF something true then_b()ElseExitloopEnd Func<snipped>You showed no exits inside any of the functions - the psuedo code mentioned will either loop forever or "end" after the until. It is only code - just try the msgbox there. Turn on TrayIconDebug and use traytips inside each function to debug,,,This option is working fine... Thx
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now