| View previous topic :: View next topic |
| Author |
Message |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Mon Sep 28, 2009 7:15 am Post subject: |
|
|
Update of 2009-09-28+ New: the setup shows the version number in the window title
+ Fixed: `r`n is handled like `n to detect the ini part of the script
+ Fixed: the ini part uses `r`n when `r`n is also found in the script part |
|
| Back to top |
|
 |
TL
Joined: 01 Nov 2006 Posts: 20
|
Posted: Mon Oct 19, 2009 12:01 pm Post subject: |
|
|
Oops, posted this in the old thread. Here it is again in the correct thread.
I set up a "Run Before" script that will update the product version number in the ini file from a project file before executing the compile. It doesn't work. It appears that "run before" executes after Compile_AHK has loaded the ini file.
This is not a big problem. I'll run the script before calling Compile_AHK.
But it does raise the question as to what type of tasks was the "Run Before" feature designed to perform?
TL |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Mon Oct 19, 2009 3:25 pm Post subject: |
|
|
do you know wherefrom compile_ahk knows what it has to run before? yes, from the ini-file. this is why it has to be read before it runs run before
ask nick / denick for the sence, it was there when i continued his work. maybe someone wanted run after - which makes sence - and he decides to also add run before. |
|
| Back to top |
|
 |
TL
Joined: 01 Nov 2006 Posts: 20
|
Posted: Mon Oct 19, 2009 4:40 pm Post subject: |
|
|
Your right, you have to read the ini file to determine if "Run before" should be run. But it could be reread after the "Run before" has executed. I think it would be worthwhile if it's not too difficult to implement.
Thanks for the quick reply,
TL |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Mon Oct 19, 2009 8:24 pm Post subject: |
|
|
| other opinions? |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Tue Oct 20, 2009 5:53 pm Post subject: |
|
|
Like I recommend this to others, I recommend it to you for same reason:
You have very much IniReads and Writes. It would speed up your script if you do all the work in memory. Load once the ini file into an variable and work on that variable. Then, delete (and backup?) the original file and write the new variables content into the place where the originial file was before.
File read and write operations are very very slow compared to variable operations on the memory (ram).
But may be it is too late for your script?
Instead of this:
| Code: | IniRead , s_INI , %s_Ini_File% , %AHK_Section% , Password , ERROR
If (s_INI = "ERROR") |
I suggest this:
| Code: | s_INI := ini_readValue(ini, AHK_Section, Password)
If ErrorLevel |
ErrorLevel is allways set. Default values are not needed.
Or if you need ErrorLevel to be untouched and need default values, try this:
| Code: | | Ini_Read(s_INI, ini, AHK_Section, Password) |
First do FileRead, ini, filePath.ini and after work delete the file and replace it with the content of the ini variable. |
|
| Back to top |
|
 |
SeedSeifer
Joined: 30 Apr 2009 Posts: 11
|
Posted: Wed Oct 28, 2009 12:16 am Post subject: Trouble with AutoHotkeySC.bin (Lexikos) |
|
|
Hi all!
I try to compile using compile_ahk (with bin from lexikos) and the icons (icon group 230) dont change...and...apears in the task bar.
So...i change a bit the code to work with _L version.
| Code: |
If Icon_1_Set ; just a copy of 1st icon command...replicated below
{
s_Script := s_Script . "-addoverwrite """ . Icon_1 """ , ICONGROUP," . "230" . ",1033`n" ; 230 its the icon group
} Else If Icon_1_Delete
{
s_Script := s_Script . "-delete ICONGROUP," . "230" . ",1033`n"
}
Loop , %Icon_Count%
{
If Icon_%A_Index%_Set
{
; ResHacker uses ResourceIds instead of IconIndex
IconGroupID := ResourceIdOfIcon(Bin_File , A_Index - 1)
s_Script := s_Script . "-addoverwrite """ . Icon_%A_Index% """ , ICONGROUP," . IconGroupID . ",1033`n"
} Else If Icon_%A_Index%_Delete
{
; ResHacker uses ResourceIds instead of IconIndex
IconGroupID := ResourceIdOfIcon(Bin_File , A_Index - 1)
s_Script := s_Script . "-delete ICONGROUP," . IconGroupID . ",1033`n"
}
}
|
Obrigado e até outra hora!  |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Wed Oct 28, 2009 7:37 am Post subject: |
|
|
does this mean that ahk_L uses another icon group number for the first icon? why?  |
|
| Back to top |
|
 |
SeedSeifer
Joined: 30 Apr 2009 Posts: 11
|
Posted: Wed Oct 28, 2009 2:56 pm Post subject: |
|
|
| ladiko wrote: | does this mean that ahk_L uses another icon group number for the first icon? why?  |
Yeah...i dont know...but i know it happens with the least version.
Original
Lexikos
Im using _L cuz have better font smooth and AA.
Att, |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Wed Oct 28, 2009 3:32 pm Post subject: |
|
|
| ahh ok there is one icon more. where is this version from? the current version from http://www.autohotkey.com/forum/viewtopic.php?t=34070 ends at icon group 229. does _L use AA by default? could u provide an example picture? is it really visible in normal gui fonts? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7299 Location: Australia
|
Posted: Wed Oct 28, 2009 9:33 pm Post subject: |
|
|
| I replaced some of the icons in revision 31 (Sep 26), but since they didn't scale well, I added icon 230 to put in the system tray. |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Wed Oct 28, 2009 9:41 pm Post subject: |
|
|
| and cause windows wants to use the best looking one, it uses your one? at least on vista/7 ? |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7299 Location: Australia
|
Posted: Wed Oct 28, 2009 9:45 pm Post subject: |
|
|
| ladiko wrote: | | and cause windows wants to use the best looking one, | Absolutely not. That's why I added this icon - AutoHotkey_L sets the tray icon specifically to that icon rather than the one that has multiple sizes. |
|
| Back to top |
|
 |
ladiko
Joined: 13 Jul 2006 Posts: 290 Location: Berlin
|
Posted: Wed Oct 28, 2009 9:51 pm Post subject: |
|
|
aah now i understand. SeedSeifer told something about the taskbar - normally this is the same icon as the windows explorer shows up for the file itself. but you both mean the system tray icon - ok.
by the way: is there an easy way to know if the autohotkeysc.bin is _L or not? the file informations doesnt provide any information about this fact?! |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 7299 Location: Australia
|
Posted: Wed Oct 28, 2009 9:56 pm Post subject: |
|
|
| With AutoHotkey_L.exe you can use the product name to differentiate, but AutoHotkeySC.bin has none... I might be able to set one without affecting compiled scripts (since it is probably overwritten?). I'll look into it. Edit: Apparently Ahk2Exe doesn't set it. I'd at least rather not add "AutoHotkey" to the bin file for the same reasons it is omitted from AutoHotkey's bin file and window titles of compiled scripts. Any ideas? |
|
| Back to top |
|
 |
|