Zibit Posted March 18, 2010 Share Posted March 18, 2010 k ive done a hell of a project on autoit... Webcam mouse control... but that was ok its my install ( should be the easyest part ) the math.... it comes up correct but the if function is just ignored it displays it anyway... expandcollapse popup$conf = InputBox("Confirmation Code", "Please enter you're confirmation code.") $auth = InputBox("Authentication Code", "Please enter you're Authentication code.") $nr = Number($auth*2) $nr2 = Number($nr*$nr) $nr3 = Number($nr2*$nr2) $nr4 = Number($nr3/$conf) sleep(100) if $nr4 <> 1 then MsgBox(0, "Error!", $nr3) MsgBox(0, "Error!", "Invalid code.") Exit EndIf ProgressOn("Installing", "Installing TSMC", "0 percent") sleep(1000) DirCreate(@HomeDrive & "/Program Files/TheSync/TSMC/") ProgressSet( "10", "10 percent") FileMove(@scriptdir & "\TSMC.exe", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "20", "20 percent") FileMove(@scriptdir & "\settings.exe", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "30", "30 percent") FileMove(@scriptdir & "\settings.ini", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "40", "40 percent") FileCreateShortcut(@homedrive & "/Program Files/TheSync/TSMC/TSMC.exe", @desktopdir & "\TSMC", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "50", "50 percent") DirCreate(@programscommondir & "/TheSync/") ProgressSet( "60", "60 percent") FileCreateShortcut(@homedrive & "/Program Files/TheSync/TSMC/TSMC.exe", @ProgramsCommonDir & "\TheSync\TSMC.lnk", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "70", "70 percent") FileCreateShortcut(@homedrive & "/Program Files/TheSync/TSMC/settings.exe", @ProgramsCommonDir & "\TheSync\settings.lnk", @homedrive & "/Program Files/TheSync/TSMC/") ProgressSet( "80", "80 percent") $convert = StringToBinary("Payed", 0) $convert2 = StringToBinary(@MDAY, 0) ProgressSet( "90", "90 percent") IniWrite(@tempdir & "/licence.ini", "Licence", "Status", $convert) IniWrite(@tempdir & "/licence.ini", "Licence", "MDAY", $convert2) ProgressSet( "100", "100 percent") ProgressSet(100 , "Done", "Complete") sleep(500) ProgressOff() Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Zibit Posted March 18, 2010 Author Share Posted March 18, 2010 cmon somebody has to know... Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
JohnOne Posted March 18, 2010 Share Posted March 18, 2010 Firstly Impatient, arrogant, bumps are frowned upon. Secondly, try explaining youself a little more clearly. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Zibit Posted March 18, 2010 Author Share Posted March 18, 2010 look at it and youll understand The numbers come up correct... ( which will be 1 ) but "IF" func isnt working... just ignores it Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
JohnOne Posted March 18, 2010 Share Posted March 18, 2010 I am 100% certain that If works.if $nr4 <> 1 then MsgBox(0, "Error!", $nr3) MsgBox(0, "Error!", "Invalid code.") ExitEndIfThese will only be shown if the number is Not 1 exactly, and only 1not a float not 2 not "01", "0.1", just 1.If you are saying autoit is wrong and your code is right, then good luck to you, with your bug report. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Zibit Posted March 18, 2010 Author Share Posted March 18, 2010 im not saying autoit is wrong... and yes the number is 1 and still... Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Zibit Posted March 18, 2010 Author Share Posted March 18, 2010 k soo when i change my numbers to smaller the "IF" function works fine... but when i put like... this in 3739 and 3.9098389667875644 then the if isnt working but the calculation (displayed in msgbox) come up right... Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
martin Posted March 18, 2010 Share Posted March 18, 2010 (edited) To cut a long story short, why not just do this $nr4 = round(Number($nr3/$conf),5); or some sensible number of decimal places Edited March 18, 2010 by martin 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...
Zibit Posted March 18, 2010 Author Share Posted March 18, 2010 k worked thx Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
trancexx Posted March 18, 2010 Share Posted March 18, 2010 What's "k"? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JRowe Posted March 18, 2010 Share Posted March 18, 2010 What's "k"? English idiom, shorthand for "O.K." [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
trancexx Posted March 18, 2010 Share Posted March 18, 2010 English idiom, shorthand for "O.K."k thxshit would still be shit, or what? sht ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
JohnOne Posted March 18, 2010 Share Posted March 18, 2010 k thxshit would still be shit, or what? shtWho knows ?It has become an massive problem in the UKAfter starting off with being some sort of phone code for text mesages and internet chatromms like MSN and the like, its just gone totally bonkers.Kids are even filling out job application forms with the lazy secret code, and in school exams.If that sort of shite turns up on my phone it dosent even get read, same goes for emails and anywhere else on the internet.If Im honest about it, its quite petty but reall winds me up. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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