Jump to content
Sign in to follow this  
polto

Au3 to Exe doesn't work

Recommended Posts

polto

I'm a newB and I'm trying to learn more about AutoIt...I try to convert this code from .au3 to .exe, but it doesn't work. The error is:

Line 0 (File "Path file.."):

$B_oIE1 = ObjCreate("Shell.Explorer.2")

$B_oIE1 = ^ERROR

Error: Unknown function name.

The code is:

#include <GuiConstants.au3> 
GUICreate("Object Test", 614, 370) 
GUISetFont(9, 400, -1, "Verdana") 

$B_oIE1 = ObjCreate("Shell.Explorer.2") 

$Breaktime = GUICtrlCreateObj($B_oIE1, -1, -1, 500, 370) 

$html = "about:CONGRADULATIONS!!!  -  You have passed, Level I Basic Exam.........   To Show Autoit can be Fun Too!!!.....  Please Press *Enter Break*" & @CR

$B_oIE1.navigate ( $html) 

$BrkStart = GUICtrlCreateButton("Vai", 515, 300, 80, 25)
$BrkEnd = GUICtrlCreateButton("Esci", 515, 330, 80, 25)

GUISetState() 

While 1 
    
    $msg = GUIGetMsg() 
    
    If $msg = $GUI_EVENT_CLOSE Or $msg = $BrkEnd Then 
        Exit
    EndIf
    
    If $msg = $BrkStart Then 
        $B_oIE1.navigate ('http://www.google.com')  
    EndIf
    
WEnd

Can anyone helps me? :D

Share this post


Link to post
Share on other sites
Nomad

I'm a newB and I'm trying to learn more about AutoIt...I try to convert this code from .au3 to .exe, but it doesn't work. The error is:

Line 0 (File "Path file.."):

$B_oIE1 = ObjCreate("Shell.Explorer.2")

$B_oIE1 = ^ERROR

Error: Unknown function name.

The code is:

#include <GuiConstants.au3> 
GUICreate("Object Test", 614, 370) 
GUISetFont(9, 400, -1, "Verdana") 

$B_oIE1 = ObjCreate("Shell.Explorer.2") 

$Breaktime = GUICtrlCreateObj($B_oIE1, -1, -1, 500, 370) 

$html = "about:CONGRADULATIONS!!!  -  You have passed, Level I Basic Exam.........   To Show Autoit can be Fun Too!!!.....  Please Press *Enter Break*" & @CR

$B_oIE1.navigate ( $html) 

$BrkStart = GUICtrlCreateButton("Vai", 515, 300, 80, 25)
$BrkEnd = GUICtrlCreateButton("Esci", 515, 330, 80, 25)

GUISetState() 

While 1 
    
    $msg = GUIGetMsg() 
    
    If $msg = $GUI_EVENT_CLOSE Or $msg = $BrkEnd Then 
        Exit
    EndIf
    
    If $msg = $BrkStart Then 
        $B_oIE1.navigate ('http://www.google.com')  
    EndIf
    
WEnd

Can anyone helps me? :D

I believe you need the beta release to use ObjCreate.


Share this post


Link to post
Share on other sites
Xenobiologist

Hi,

yeah! Definately needs beta.

http://www.autoitscript.com/autoit3/files/beta/autoit/

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
Xenobiologist

HI,

you have to use beta compile!

It is easier using Scite. There are options for beta run and beta compile.

(You can also toggle to beta.)

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
polto

I have already installed beta version.. Maybe the "Compile Script to .exe" doesn't see the beta version, but only the original version..It's possible? How can I solve?

I understand my error, but the problem is the same..I launched "Compile Script to .exe" and not "Compile(beta) Script to .exe"...But now the error is:

Error: Unable to execute upx.exe to compress stub file

Why?

Share this post


Link to post
Share on other sites
Nomad

I understand my error, but the problem is the same..I launched "Compile Script to .exe" and not "Compile(beta) Script to .exe"...But now the error is:

Error: Unable to execute upx.exe to compress stub file

Why?

When I first installed beta, I already had the production version and I couldn't get anything to work right until I re-installed SciTe. Since then everything has been great. Try re-installing SciTe and see if that helps.

Nomad :D


Share this post


Link to post
Share on other sites
polto

When I first installed beta, I already had the production version and I couldn't get anything to work right until I re-installed SciTe. Since then everything has been great. Try re-installing SciTe and see if that helps.

Nomad :D

Solved! I installed the beta version from zip files, without the file upx.exe..Now, after installing the beta versione from the setup file, I got it...Many thanks to all, really..great forum :D

Share this post


Link to post
Share on other sites
Nomad

@Jon < I am so looking forward to the next release...

Lar.

Why? Is the next release going to have it all in the production? That would be nice. :D


Share this post


Link to post
Share on other sites
Nomad

Solved! I installed the beta version from zip files, without the file upx.exe..Now, after installing the beta versione from the setup file, I got it...Many thanks to all, really..great forum :D

No problem. I much prefer the beta anyway. It has many more options and I need a lot of the functions which can't be used in the production. I haven't had any stability issues that I can think of either. Enjoy. :D


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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.