ossyconno Posted March 5, 2004 Share Posted March 5, 2004 I wondering if anyone could teach me how the if not's, until not's while's and endif's work. I put a script together in v2 and used the converter in v3, but at my point in learning script writing I am afraid I am having trouble understanding how the yes no cancel options work in the msgbox. I looked at the help files but it was just mumbo jumbo to me. Version 2 SetKeyDelay, 5 WinActivate, Copyright Notice - Microsoft Internet Explorer MouseMove, 448, 563 InputBox, File, Copy, Input file name you are looking for. WinActivate, Quattro Pro 11 Send, !e Send, f Send, %File% Again: Send, !n MsgBox, 3, Copy, Do you want to proceed now? IfMsgBox, YES, Goto, Copy IfMsgBox, NO, Goto, Again IfMsgBox, CANCEL, Goto, Exit Copy: Send, !c Send, !e Send, c WinActivate, Add new download Send, {TAB 5} Send, ^v Send, {ENTER} Winactivate, Copyright Notice - Microsoft Internet Explorer MouseMove, 36, 72 Exit Exit: Exit Version 3 ; V2.64 to V3.0.93 (Version 1.0.4) ; Converted with AutoItV2toV3 [Version 1.0.5] ; © Copyright 2004 J-Paul Mesnage. ; Prologue ; should be renamed (?) and called somewhere if you are converting an include file __init() ; End Prologue ; Program Copies and searches for requested file AutoItSetOption ( "SendKeyDelay", 5 ) WinActivate ( 'Copyright Notice - Microsoft Internet Explorer' ) MouseMove ( 448, 563 ) $File = InputBox ( 'Copy', 'Input file name you are looking for.' ) WinActivate ( 'Quattro Pro 11' ) Send ( '!e' ) Send ( 'f' ) Send ( $File ) while (1) ; Again : beginning of loop OR Func Again () Send ( '!n' ) $__msgbox = MsgBox ( 3, 'Copy', 'Do you want to proceed now?' ) if NOT ( $__msgbox = 6 ) then *** FATAL ERROR While referenced by GOTO, Again until NOT ( $__msgbox = 7 ) if NOT ( $__msgbox = 2 ) then endif ;;;; Copy Send ( '!c' ) Send ( '!e' ) Send ( 'c' ) WinActivate ( 'Add new download' ) Send ( '{TAB 5}' ) Send ( '^v' ) Send ( '{ENTER}' ) WinActivate ( 'Copyright Notice - Microsoft Internet Explorer' ) MouseMove ( 36, 72 ) Exit endif ;; Exit Exit ; Epilogue Extra Functions needed for Compatibility execution ; take care of possible redefinition if you are converting an include file ; func __init () ; to define global variables needed endfunc ; End Epilogue Link to comment Share on other sites More sharing options...
GrahamS Posted March 5, 2004 Share Posted March 5, 2004 No wonder you're confused, so am I! Actually what it looks like has happend is that the v2 to v3 converter has failed to convert your script properly. I would suggest that you check to see that you have the latest version of the converter (and the latest AutoIt 3, i.e. 3.0.100). If you already have the latest version then post a bug report on the V3 support list (basically just your post with a title like "Bug in V3 converter program). In the mean time, if you want to progress then replace while (1); Again : beginning of loop OR Func Again () Send ( '!n' ) $__msgbox = MsgBox ( 3, 'Copy', 'Do you want to proceed now?' ) if NOT ( $__msgbox = 6 ) then *** FATAL ERROR While referenced by GOTO, Again until NOT ( $__msgbox = 7 ) if NOT ( $__msgbox = 2 ) then endif;;;; Copy with the following while (1); Loop forever Send ( '!n' ) $__msgbox = MsgBox ( 3, 'Copy', 'Do you want to proceed now?' ) if $__msgbox = 6 then exitloop ; YES pressed - continue if $__msgbox = 2 then exit ; CANCEL pressed - exit program wend Also remove the lines endif;; Exit Exit GrahamS Link to comment Share on other sites More sharing options...
ossyconno Posted March 5, 2004 Author Share Posted March 5, 2004 Thanks Graham Link to comment Share on other sites More sharing options...
jpm Posted March 5, 2004 Share Posted March 5, 2004 If you already have the latest version then post a bug report on the V3 support list (basically just your post with a title like "Bug in V3 converter program).I see the post and I will have a look at the error.That's a long time I have not been inside AutoItV2toV3.I am as you can have seen in the AutoIt3-gui Link to comment Share on other sites More sharing options...
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