Orgins Posted August 25, 2007 Share Posted August 25, 2007 (edited) Every time I use a ">" it says it was expecting a "=". Any pointers? $Begin = TimerInit() $i = 0 Do If TimerDiff($begin)/1000 > 15 Then $i + 1 Endif Sleep(500) Until $i = 1 Edit*Guess topic title should of say'd If timerdiff. Edited August 25, 2007 by Orgins I'm a newbie.Sorry if I don't reposed to your replays very fast. Link to comment Share on other sites More sharing options...
martin Posted August 25, 2007 Share Posted August 25, 2007 Every time I use a ">" it says it was expecting a "=". Any pointers? $Begin = TimerInit() $i = 0 Do If TimerDiff($begin)/1000 > 15 Then $i + 1 Endif Sleep(500) Until $i = 1 $Begin = TimerInit() $i = 0 Do If TimerDiff($begin)/1000 > 15 Then $i += 1;Endif Sleep(500) Until $i = 1 Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Orgins Posted August 25, 2007 Author Share Posted August 25, 2007 I get the same pop up. Expecting a "=". I'm a newbie.Sorry if I don't reposed to your replays very fast. Link to comment Share on other sites More sharing options...
martin Posted August 25, 2007 Share Posted August 25, 2007 I get the same pop up. Expecting a "=".Are you sure you tested with the code I posted?Where is it expecting the "="? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Nahuel Posted August 25, 2007 Share Posted August 25, 2007 Works for me. Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 25, 2007 Share Posted August 25, 2007 I get the same pop up. Expecting a "=".Then you didn't use martin's code. There were two things wrong with your code, and neither has anything to do with TimerDiff():1. Your syntax is wrong for incrementing $i in the 'Then' portion of the 'If' line -- martin's corrected it.2. When you put an If/Then condition on one line, you don't use EndIf -- martin's code corrected that by commenting it out.If you had run martin's code, it would have worked. If you were running it in SciTE the console would tell you exactly where to look. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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