AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileInstall Help...

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Epuls56



Joined: 19 Apr 2008
Posts: 33

PostPosted: Tue Apr 22, 2008 1:57 pm    Post subject: FileInstall Help... Reply with quote

What is wrong with this code? It doesn't seem to work...



Code:
#NoEnv
SetWorkingDir,%A_ScriptDir%
r::SoundPlay, 03-I'm Not Jesus
esc::exitapp

enter::reload

Fileinstall, C:\Documents and Settings\Ethen\Desktop\03-I'm Not Jesus.wav, C:\Documents and Settings\Ethen\Desktop\AHK scripts and programs\The prank files\Soundplay and fileinstall test\03-I'm Not Jesus.wav,1
Back to top
View user's profile Send private message
Epuls56



Joined: 19 Apr 2008
Posts: 33

PostPosted: Tue Apr 22, 2008 1:58 pm    Post subject: Reply with quote

and no thats not a satanic song.
Back to top
View user's profile Send private message
Razlin



Joined: 05 Nov 2007
Posts: 370
Location: canada

PostPosted: Tue Apr 22, 2008 2:24 pm    Post subject: Reply with quote

what is it thats not working?

the "joke" or the fileinstall?

fileinstall works when you Compile a script

It doesnt work if not compiled.
as per help file
Quote:
Includes the specified file inside the compiled version of the script.

_________________
-=Raz=-
Back to top
View user's profile Send private message
Epuls56



Joined: 19 Apr 2008
Posts: 33

PostPosted: Wed Apr 23, 2008 12:17 am    Post subject: Reply with quote

I compiled it, it compiles just fine, but it doesn't extract it back out.
Back to top
View user's profile Send private message
skwire



Joined: 18 Jan 2006
Posts: 132
Location: Conway, Arkansas

PostPosted: Thu Apr 24, 2008 12:04 pm    Post subject: Reply with quote

Epuls56 wrote:
I compiled it, it compiles just fine, but it doesn't extract it back out.

It doesn't extract it back out because it never gets to that part of your code when you're running the compiled exe. Read the first paragraph of this section: http://www.autohotkey.com/docs/Scripts.htm#auto

So, in your code, the auto-execute section stops at this line:

Code:
r::SoundPlay, 03-I'm Not Jesus


Another caveat with FileInstall is that it will not create the destination directory. It must exist for the extraction to work. Consider this example:

Code:
#NoEnv
SetWorkingDir,%A_ScriptDir%
Destination_Dir := "C:\Documents and Settings\Ethen\Desktop\AHK scripts and programs\The prank files\Soundplay and fileinstall test"

IfNotExist, %Destination_Dir%
{
    FileCreateDir, %Destination_Dir%
}
FileInstall, C:\Documents and Settings\Ethen\Desktop\03-I'm Not Jesus.wav, %Destination_Dir%\03-I'm Not Jesus.wav, 1
; End of auto-execute section

r::SoundPlay, %Destination_Dir%\03-I'm Not Jesus.wav
esc::exitapp
enter::reload
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group