AutoHotkey Community

It is currently May 26th, 2012, 10:50 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 414 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19, 20 ... 28  Next
Author Message
 Post subject:
PostPosted: September 28th, 2009, 8:15 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 19th, 2009, 1:01 pm 
Offline

Joined: November 1st, 2006, 8:33 pm
Posts: 21
Location: Chicago, IL
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 19th, 2009, 4:25 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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 :D

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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 19th, 2009, 5:40 pm 
Offline

Joined: November 1st, 2006, 8:33 pm
Posts: 21
Location: Chicago, IL
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 19th, 2009, 9:24 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
other opinions?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2009, 6:53 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
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.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: October 28th, 2009, 1:16 am 
Offline

Joined: April 30th, 2009, 5:20 pm
Posts: 11
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. :shock:
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! :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 8:37 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
does this mean that ahk_L uses another icon group number for the first icon? why? :?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 3:56 pm 
Offline

Joined: April 30th, 2009, 5:20 pm
Posts: 11
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
Image

Lexikos
Image

Im using _L cuz have better font smooth and AA.

Att,


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 4:32 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 10:33 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 10:41 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
and cause windows wants to use the best looking one, it uses your one? at least on vista/7 ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 10:45 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 10:51 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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?!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 28th, 2009, 10:56 pm 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7502
Location: Australia
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?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 414 posts ]  Go to page Previous  1 ... 14, 15, 16, 17, 18, 19, 20 ... 28  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group