Sign in to follow this  
Followers 0
Zibit

WTF is going on ?!?!?!?!?

13 posts in this topic

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...

$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()

Share this post


Link to post
Share on other sites



I am 100% certain that If works.

if $nr4 <> 1 then

MsgBox(0, "Error!", $nr3)

MsgBox(0, "Error!", "Invalid code.")

Exit

EndIf

These will only be shown if the number is Not 1 exactly, and only 1

not 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.

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

What's "k"? :(


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

English idiom, shorthand for "O.K."

k thx

shit would still be shit, or what? sht


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

k thx

shit would still be shit, or what? sht

Who knows ?

It has become an massive problem in the UK

After 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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0