Sign in to follow this  
Followers 0
tobi2006

Au3 script works perfect but not the compiled script

7 posts in this topic

#1 ·  Posted (edited)

I wrote a script and saved it like it's normal as an au3 file. Then I ran it as beta. Everything works perfect. But when I compile the script to an exe file it works not how it should work. Some functions won't work.

For example:

I'm going to read out an html file with a text "1.0.1". In the script is a text "1.0". Now it should compare if the both are the same or not. If not, it should show me it in a MsgBox.

But now when it's the same:

IN AU3 it prints out: "No updates available!"

IN EXE it prints out: "Version 0 is available!"

Then there is a second error. But why the compiled script isn't the same as the au3 script?

$ie=_IECreate("http://www.tobiserver.kilu.de/SWAP/version.htm",0,0)
   $ieread=_IEBodyReadText($ie)
   If $ieread = "1.0.1" Then
       MsgBox(0,"SoundWave Audio Player","Keine Updates verfügbar!")
   Else
       MsgBox(0,"SoundWave Audio Player","Version " & $ieread & " steht zum Download bereit" & @CRLF & @CRLF & "http://www.tobiserver.kilu.de/soundwave.htm")
    EndIf
Edited by tobi2006

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It works the same compiled as ran with F5 in SciTE for me.

Both times the returned ver = 1.0 and the popup shows up stating there is an update.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

It works the same compiled as ran with F% in SciTE for me.

Both times the returned ver = 1.0 and the popup shows up stating there is an update.

When I compiled it, it returns ver = 0.

Share this post


Link to post
Share on other sites

are you using the latest stable AutoIt version?


[right]~What can I say, I'm a Simplistic person[/right]

Share this post


Link to post
Share on other sites

are you using the latest stable AutoIt version?

I'm using AutoIt Ver. 3.2.12.1

And there is no update yet.

Share this post


Link to post
Share on other sites

Make sure you compile it with same version so you don't write a script for 3.2.12.1 and compile with Beta or vice versa.

Share this post


Link to post
Share on other sites

Okay, no problem anymore. I played around with the settings in the compile dialog. And now it works fine! But before I never played around with the settings. Oh, I am so happy! Thx for your help^^

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