Theoretically, any type can be included. Those are just the officially supported ones.
Still waiting on the release with ahk
Upcoming Ahk2Exe changes
Re: Upcoming Ahk2Exe changes
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Upcoming Ahk2Exe changes
Is that expected to happen with the official release?
Re: Upcoming Ahk2Exe changes
Cant compile ahk2exe edge with v1.1.22.03 on win7 x64.
Worked before.
Ahk2Exe Error
---------------------------
Error changing icon: Unable to read icon or icon was of the wrong format.
Worked before.
Ahk2Exe Error
---------------------------
Error changing icon: Unable to read icon or icon was of the wrong format.
Re: Upcoming Ahk2Exe changes
The mentioned icon is OK? Right format, right name, no access problems? Tried reboot of PC?
Peter (AHK Beginner) / Win 10 x64, AHK Version v1.1.33
Re: Upcoming Ahk2Exe changes
I'm confused...why are you trying to compile ahk2exe....isn't it already an executable ?haichen wrote:Cant compile ahk2exe edge with v1.1.22.03 on win7 x64.
Worked before.
Ahk2Exe Error
---------------------------
Error changing icon: Unable to read icon or icon was of the wrong format.
Re: Upcoming Ahk2Exe changes
Sorry, I mean compiling the source ahk2exe.ahk to ahk2exe.exe
Works without problems at home with my old win8.1 x32 pc. Doesn't compile at my work pc. I've done this with all prior ahk versions. So I thought to inform finc.
Works without problems at home with my old win8.1 x32 pc. Doesn't compile at my work pc. I've done this with all prior ahk versions. So I thought to inform finc.
Re: Upcoming Ahk2Exe changes
Are you compiling the source code for the ahk2exe so that it'll have the latest updates/improvements and fixes that 1.1.22.03 provide?haichen wrote:Sorry, I mean compiling the source ahk2exe.ahk to ahk2exe.exe
Works without problems at home with my old win8.1 x32 pc. Doesn't compile at my work pc. I've done this with all prior ahk versions. So I thought to inform finc.
Re: Upcoming Ahk2Exe changes
I don't really believe it makes a difference, because the autohotkey.bin carrys all the news and fixes. So an exe compiled with an "old" ahk2exe.exe will have all fixes and updates from the included bin (i think).
But i hope the compiler directives will someday come into the release version. So please! .. finc have a look at your compiler
But i hope the compiler directives will someday come into the release version. So please! .. finc have a look at your compiler
Re: Upcoming Ahk2Exe changes
So to be clear, you're saying that as long as I have the latest Unicode 64-bit.bin, ANSI 32-bit.bin, AutoHotkeySC.bin, Unicode 32-bit.bin that i can use THIS ahk2exe (which is from the beginning of 2015) and my compiled exe's will have the latest updates/fixes from 1.1.22.03?haichen wrote:I don't really believe it makes a difference, because the autohotkey.bin carrys all the news and fixes. So an exe compiled with an "old" ahk2exe.exe will have all fixes and updates from the included bin (i think).
But i hope the compiler directives will someday come into the release version. So please! .. finc have a look at your compiler
PS: How do i add resources? There is no "optional parameters" box in the GUI that comes up when i double click ahk2exe.
PPS: Sorry to take over your topic but i'd like to fully understand this ahk2exe as i'd LOVE to include custom resources in my exe's!
Re: Upcoming Ahk2Exe changes
@Skrell yup
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: Upcoming Ahk2Exe changes
Awesome!! What about my "PS" btw?joedf wrote:@Skrell yup
Re: Upcoming Ahk2Exe changes
did you read the first post in the thread?Skrell wrote: What about my "PS" btw?
Re: Upcoming Ahk2Exe changes
Yes, but had 2 questions:guest3456 wrote:did you read the first post in the thread?Skrell wrote: What about my "PS" btw?
1. When you include resources using the syntax below how does the compiler know where to look for the files? Does it just look for them in the same directory as the ahk you are compiling?
;@Ahk2Exe-AddResource someBmp.bmp
;@Ahk2Exe-AddResource test.html
2. How do you then reference the compiled resources from within the ahk source code? Again, do you just use their regular names as if they were in the same directory as the executable being run?
Re: Upcoming Ahk2Exe changes
Got it! You can delete my last post if the admin wishes!
Re: Upcoming Ahk2Exe changes
Ok so i followed the example demo as best i could and of course it didn't work. So here is what i did:
Added @ahk2exe-AddResource snap.wav to the top of my file.
Then referenced it like this:
SoundPlay, "SNAP.wav"
and nothing happens. Now i know that wav files aren't technically on the list of "officially supported filetypes" but it was my understanding that almost any file should work.
Can someone please help me?
Added @ahk2exe-AddResource snap.wav to the top of my file.
Then referenced it like this:
SoundPlay, "SNAP.wav"
and nothing happens. Now i know that wav files aren't technically on the list of "officially supported filetypes" but it was my understanding that almost any file should work.
Can someone please help me?
Re: Upcoming Ahk2Exe changes
How mostly the error is sitting infront of the monitor.
Of course i could compile ahk2exe.ahk with the newest AHK!
What i did:
I tried to compile ahk2exe.ahk with a rightclick on it.
and i get my error message.
What i forgot:
Shorttime ago i compiled a program by directly opening ahk2exe.exe
At the gui of Ahk2exe.exe i changed the icon for that program. Everything OK.
..but meanwhile i deleted the icon.
The gui (ahk2exe.exe) dont forget the path. And by rigthclick to compile, ahk2exe.exe
tried to take this path and dont find an icon.
So I hope to remember: Ahk2exe.exe dont forget you.r icon.
Of course i could compile ahk2exe.ahk with the newest AHK!
What i did:
I tried to compile ahk2exe.ahk with a rightclick on it.
and i get my error message.
What i forgot:
Shorttime ago i compiled a program by directly opening ahk2exe.exe
At the gui of Ahk2exe.exe i changed the icon for that program. Everything OK.
..but meanwhile i deleted the icon.
The gui (ahk2exe.exe) dont forget the path. And by rigthclick to compile, ahk2exe.exe
tried to take this path and dont find an icon.
So I hope to remember: Ahk2exe.exe dont forget you.r icon.
Re: Upcoming Ahk2Exe changes
No one can tell me if *.wav files should work ?
Re: Upcoming Ahk2Exe changes
try this:Skrell wrote:No one can tell me if *.wav files should work ?
Code: Select all
; http://www.autohotkey.com/board/topic/96484-read-wave-resource-from-exe-using-skans-dllread-possible/
#NoEnv
ResRead( Sound, "test.wav" )
PlaySound( Sound )
Return ; // end of auto-execute section //
FileInstall, test.wav, -
;never executed, so never extracted, this should be replaced with ahk2exe directives when applicable!
; ResRead() By SKAN, from http://www.autohotkey.com/board/topic/57631-crazy-scripting-resource-only-dll-for-dummies-36l-v07/?p=609282
ResRead( ByRef Var, Key ) {
VarSetCapacity( Var, 128 ), VarSetCapacity( Var, 0 )
If ! ( A_IsCompiled ) {
FileGetSize, nSize, %Key%
FileRead, Var, *c %Key%
Return nSize
}
If hMod := DllCall( "GetModuleHandle", UInt,0 )
If hRes := DllCall( "FindResource", UInt,hMod, Str,Key, UInt,10 )
If hData := DllCall( "LoadResource", UInt,hMod, UInt,hRes )
If pData := DllCall( "LockResource", UInt,hData )
Return VarSetCapacity( Var, nSize := DllCall( "SizeofResource", UInt,hMod, UInt,hRes ) )
, DllCall( "RtlMoveMemory", Str,Var, UInt,pData, UInt,nSize )
Return 0
}
PlaySound( ByRef Sound ) {
Return DllCall( "winmm.dll\PlaySound" ( A_IsUnicode ? "W" : "A" ), UInt,&Sound, UInt,0
, UInt, 0x6 ) ; SND_MEMORY := 0x4 | SND_NODEFAULT := 0x2
}
PlaySoundAsync( ByRef Sound ) {
Return DllCall( "winmm.dll\PlaySound" ( A_IsUnicode ? "W" : "A" ), UInt,&Sound, UInt,0, UInt, 0x7 )
}
Re: Upcoming Ahk2Exe changes
1. Thank you for helping! But a few questions:tmplinshi wrote: try this:Code: Select all
; http://www.autohotkey.com/board/topic/96484-read-wave-resource-from-exe-using-skans-dllread-possible/ #NoEnv ResRead( Sound, "test.wav" ) PlaySound( Sound ) Return ; // end of auto-execute section // FileInstall, test.wav, - ;never executed, so never extracted, this should be replaced with ahk2exe directives when applicable! ; ResRead() By SKAN, from http://www.autohotkey.com/board/topic/57631-crazy-scripting-resource-only-dll-for-dummies-36l-v07/?p=609282 ResRead( ByRef Var, Key ) { VarSetCapacity( Var, 128 ), VarSetCapacity( Var, 0 ) If ! ( A_IsCompiled ) { FileGetSize, nSize, %Key% FileRead, Var, *c %Key% Return nSize } If hMod := DllCall( "GetModuleHandle", UInt,0 ) If hRes := DllCall( "FindResource", UInt,hMod, Str,Key, UInt,10 ) If hData := DllCall( "LoadResource", UInt,hMod, UInt,hRes ) If pData := DllCall( "LockResource", UInt,hData ) Return VarSetCapacity( Var, nSize := DllCall( "SizeofResource", UInt,hMod, UInt,hRes ) ) , DllCall( "RtlMoveMemory", Str,Var, UInt,pData, UInt,nSize ) Return 0 } PlaySound( ByRef Sound ) { Return DllCall( "winmm.dll\PlaySound" ( A_IsUnicode ? "W" : "A" ), UInt,&Sound, UInt,0 , UInt, 0x6 ) ; SND_MEMORY := 0x4 | SND_NODEFAULT := 0x2 } PlaySoundAsync( ByRef Sound ) { Return DllCall( "winmm.dll\PlaySound" ( A_IsUnicode ? "W" : "A" ), UInt,&Sound, UInt,0, UInt, 0x7 ) }
2. Do i still need to use ;@Ahk2Exe-AddResource SNAP.wav ?
3. Should the function call "PlaySound ( Sound)" be used to play the sound instead of "SoundPlay" ?
4. Shouldn't "FileInstall, SNAP.wav, - " be in the autoexec section at the top of my code along with "ResRead( Sound, "SNAP.wav" )" ?
Who is online
Users browsing this forum: No registered users and 11 guests