Sign in to follow this  
Followers 0
AL3X

--

15 posts in this topic

#1 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites



Hi all :D!

I have a little problem :). I have this:

...         
If not FileExists(@TempDir & "\acercade.au3") Then
        FileInstall("acercade.au3", @TempDir & "\acercade.au3")
EndIf
Run('"' & @AutoItExe & '" /ErrorStdOut /AutoIt3ExecuteScript "' & @TempDir & "\acercade.au3" & '"')
...

and it works when not compiled, but when I compile the script it doesnt work... Why? :S

Thanks :D

You're running it with the /AutoIt3ExecuteScript parameter. Does the acercade.au3 have any #include dependencies that aren't included in your compiled .EXE?

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

Try changing the FileInstall to include the path to "acercade.au3"

FileInstall(@ScriptDir & "\acercade.au3", @TempDir & "\acercade.au3")

Of course if the file is not in @ScriptDir then you will have to modify the path.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

Wow GEO, I never thought I'd see you make that mistake. No variables/macros in the source parameter. Tsk tsk.

The problem is that scripts must have all the needed #include's and if your script is not compiled (that au3 FileInstall'ed one) the FileInstall will not work correctly (the smaller script that gets extracted, I mean).

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

FileInstall(@ScriptDir & "\icono2.gif", @TempDir & "\IconoYouTuBeDownloader.gif", 1)

You have a variables/macros in the source parameter of FileInstall.


[sub]Quantum mechanics: The dreams stuff is made of[/sub]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

Wow GEO, I never thought I'd see you make that mistake. No variables/macros in the source parameter. Tsk tsk.

The problem is that scripts must have all the needed #include's and if your script is not compiled (that au3 FileInstall'ed one) the FileInstall will not work correctly (the smaller script that gets extracted, I mean).

:D:D Right you are. Not enough coffee this morning. That's my excuse and I'm sticking to it!

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

No, the problem is that an au3 file can't properly use FileInstall. When running uncompiled, in the case of the au3 source, it uses a copy operation instead of an extraction as there is no executable to extract from.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

Try copying the gif to a different location. You might just not have the proper permissions to copy there. If you're using Vista try adding

#RequireAdmin
to the top of your code(s). That will send up an annoying little permissions box but it should also allow you to copy to most directories.

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

--

Edited by AL3X

Share this post


Link to post
Share on other sites

Add the file to your main script, and FileInstall it before you run the sub script.

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