Jump to content


Photo

suspend/pause icon


  • Please log in to reply
13 replies to this topic

#1 krajan

krajan
  • Members
  • 44 posts

Posted 31 May 2012 - 09:23 PM

Hi guys

One my script compiles another one...

run, Ahk2Exe.exe /in "C:\AHK\scriptName.ahk" /out "Z:\Script.exe" /icon "C:\AHK\Icons\ScriptMain.ico"

I would like to also compile suspend and pause icon in the same way. Is it possible?


Cheers

#2 TheDewd

TheDewd
  • Members
  • 823 posts

Posted 31 May 2012 - 09:28 PM

No, I don't believe so. The only way that I'm aware of is to use a program like Resource Hacker to replace the icons AFTER you've compiled your executable file.

<!-- w -->www.angusj.com/resourcehacker/<!-- w -->

#3 Klark92

Klark92
  • Members
  • 854 posts

Posted 31 May 2012 - 09:57 PM

Try my compiler project :)
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=2&t=87016">viewtopic.php?f=2&t=87016</a><!-- l -->

#4 krajan

krajan
  • Members
  • 44 posts

Posted 31 May 2012 - 10:15 PM

Thanks

I know there are few compilers from users can do this. The problem is my script needs to be compiled automatically. My other script waits for a new data. In case of any changes it updates thr data and compiles new script. The data changes quite often. I cant run the compiler manually every time.


So... If it is possible to show the paths to icons in your compiler then "The Code" does exist (: Am I right?

#5 Klark92

Klark92
  • Members
  • 854 posts

Posted 31 May 2012 - 10:24 PM

You mean main icon suspend and pause icon is will be same after compile when you use that command line ?

#6 krajan

krajan
  • Members
  • 44 posts

Posted 31 May 2012 - 10:31 PM

Yep, the suspend/pause icon can be the same as the main one. But would be great to know how to use different ones in the future.

#7 Klark92

Klark92
  • Members
  • 854 posts

Posted 31 May 2012 - 10:36 PM

you will need Two exe file for this operation agree ?

#8 Klark92

Klark92
  • Members
  • 854 posts

Posted 31 May 2012 - 10:58 PM

<!-- m -->http://www.mediafire...f2zvtup1sw588ks<!-- m -->

Copy that executable file to ahk2exe.exe path and the command line will be like that : ^^

run, Ahk2ExeH.exe /in "C:\AHK\scriptName.ahk" /out "Z:\Script.exe" /icon "C:\AHK\Icons\ScriptMain.ico"

a thanks is enough

#9 krajan

krajan
  • Members
  • 44 posts

Posted 01 June 2012 - 07:12 AM

Thank you Klark92 (:


[btw... it's not working. Your exe compiles my script but icons are default green/red S/H]

#10 Klark92

Klark92
  • Members
  • 854 posts

Posted 01 June 2012 - 09:00 AM

what command line you used before the compile ? you can found a bug because I used regular expression(I'm not good about that)

#11 krajan

krajan
  • Members
  • 44 posts

Posted 01 June 2012 - 09:54 AM

I am trying as simple as I can

example:
gui, add, button, gCompile, compile
gui, show
return

Compile:
run, compileScript.ahk
return



compileScript.ahk:
run, C:\Program Files\AutoHotkey\Compiler\Ahk2ExeH.exe /in "C:\AHK\scriptName.ahk" /out "Z:\Script.exe" /icon "C:\AHK\Icons\ScriptMain.ico"


#12 Klark92

Klark92
  • Members
  • 854 posts

Posted 01 June 2012 - 12:36 PM

still only problem is regular expression match ^^ sorry about that .. my EXE file is open source .. you can found true regex match code and replace with my regex than your problem is ok ..

Drive:\path\filename.ico .. I tried to match that but I fail .. you do it ..

#13 Guests

  • Guests

Posted 01 June 2012 - 12:40 PM

My other script waits for a new data. In case of any changes it updates thr data and compiles new script. The data changes quite often.

That sounds very inefficient why not store that data in an INI or XML file and read that, saves you the trouble of compiling every time and you still only have to copy one file if you need it elsewhere (the data file instead of the exe)

#14 Klark92

Klark92
  • Members
  • 854 posts

Posted 01 June 2012 - 12:52 PM

<!-- m -->http://www.mediafire...6119kcki9cxxr90<!-- m -->

by the way, try this .. maybe for this time I will work ^^