AutoHotkey Community

It is currently May 27th, 2012, 3:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 453 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 31  Next
Author Message
 Post subject:
PostPosted: May 19th, 2010, 5:39 pm 
Offline

Joined: February 13th, 2007, 3:54 pm
Posts: 21
Hi micha,

I would like to thank you for your great effort, I am using autohotkeyCE quite a lot. Thanks!

edit:
I had a problem, but I solved it by using unicode version of AutoHotkeyCE


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 19th, 2010, 8:47 pm 
Offline

Joined: February 13th, 2007, 3:54 pm
Posts: 21
hi again,

I am using Unicode version of ahk(AutoHotkeyCEUni 1.0.48.124) and I noticed it uses over twice the memory than ANSI version.
UNI: 3.6MB
ANSI: 1.4MB
Test app:
Code:
msgbox helloworld
return


But the biggest problem I have is with regwrite, which has huge mem leak.
One call increases memory by 170kB
Code below increases memory use to 20MB
Code:
msgbox start
value := 10
loop 200
{
  RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE, Software\helloworld , Progress, %value%
}
msgbox end
return
[/code]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2010, 9:07 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
Hi,
i've uploaded V 1.0.48.291.
# (1.0.48.291 ) (25/50/10) Fixed memory leaks in RegRead / RegWrite functions
# (1.0.48.285) (25/05/10) Fixed Binary Data. /

@Futurity: If there are still memory leaks, please report them. I'll have another look at it.

Ciao
Micha

Edit: Memory usage: The only changes are "char -> TCHAR". AHK does not work properly because it used too much memory. I had to rewrite some allocations from
char var[65535]
to
TCHAR *pvar = new TCHAR[65535] ..... delete [] pvar;
to decrease static memory usage.
I'm not sure if I can do anything against the current memory usage.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 7:42 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Hi. I've just started using AutohotkeyCE, and i'm having some issues with FileSelectFile:
- only seems to detect folders/files in the "My Documents" folder
- doesn't go down more than one folder within "My Documents" folder
- i cannot make it start at a specific folder
Any chance that it could be fixed?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 6:06 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
a_h_k wrote:
Hi. I've just started using AutohotkeyCE, and i'm having some issues with FileSelectFile:
- only seems to detect folders/files in the "My Documents" folder
- doesn't go down more than one folder within "My Documents" folder
- i cannot make it start at a specific folder
Any chance that it could be fixed?


I searched the web and this is the default behavior of the function.
On Windows Mobile 5.0 and later the new function GetOpenFileNameEx seems to be fixed.
If I upgrade, ahkce does not work on older devices any more. Some devices (PNAs) does not include the aygshell.dll so ahkce will not work on these devices anymore.

Edit: I've added the code to dynamically load the function of the aygshell.dll.
If the function was found, FileSelectFile will use it.
You can download the ahkce.exe at http://www.autohotkey.net/~Micha/AutohotkeyCE/AutohotkeyCEOpenFileNameEx.zip


Last edited by Micha on June 19th, 2010, 7:18 pm, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 6:11 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
Uploaded V 372 with a new command to rotate the screen.

I'm using a script as a program starter. Some apps needs a rotated screen.
So you can write:
Code:
ChangeDisplaySettings, 90
runwait, xxx
ChangeDisplaySettings, 0


ChangeDisplaySettings, cmd, param1

Parameters:

cmd: Orientation

param1: 0, 90, 180, 270: Rotates the screen in x degrees

Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 19th, 2010, 7:56 pm 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
Wow, I've missed alot! Thanks for the excellent work Micha! Can't wait to play around with the new versions!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2010, 7:26 am 
Offline

Joined: April 4th, 2010, 8:14 am
Posts: 14
Location: China
the ahk2exe doesn't work at all,v372 uni .click at a compiled script = nothing..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2010, 7:31 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
wei2005yh wrote:
the ahk2exe doesn't work at all,v372 uni .click at a compiled script = nothing..

Hi wei2005yh,
I've downloaded the installer fresh from the web, installed the cab on the windows ce emulator and compiled a short script (Msgbox, It works). After the compilation I started the exe and the MessageBox was shown.

So could you please tell me more how to reproduce your problem?
Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2010, 11:17 pm 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
i have to agree with Micha (sorry if i mispell/have crappy grammer, i'm on vacation in seattle and only have my phone to be on the web).
i don't have any problems with the compiler either...
it's probably due to a particular command you're trying to use.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2010, 2:32 pm 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Hi. Can "Run" accept parameters?

_________________
My Ahk Site


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 8th, 2010, 5:25 pm 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
a_h_k wrote:
Hi. Can "Run" accept parameters?

You mean like
Code:
Run Pword.exe \Program Files\AutoHotkeyCE\AutohotkeyCE.ahk
then yes


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 9th, 2010, 5:06 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Okay, so Run in AutohotkeyCE accepts parameters. Can Autohotkey (non-compiled/ahk) scripts receive parameters?

\My Documents
> Test.ahk
\My Documents\This Folder
> PassParam.ahk <--- run this

PassParam.ahk...
Code:
ScriptDir = "%A_Script_Dir%"

MsgBox Run "\My Documents\Test.ahk" %ScriptDir%

Run "\My Documents\Test.ahk" %ScriptDir%
Result:
> Run "\My Documents\Test.ahk" "\My Documents"

Test.ahk...
Code:
num_params = %0%
If num_params = 1
  ScriptDir = %1%
Else
  ScriptDir := A_ScriptDir

MsgBox num_params = %num_params%`nScriptDir = %ScriptDir%`nparam 1 = %1%
Result:
> num_params = 0 <--- ?!
> ScriptDir = \My Documents . . . (ie not "\My Documents\This Folder")
> param 1 =

_________________
My Ahk Site


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2010, 8:00 am 
Offline

Joined: April 4th, 2010, 8:14 am
Posts: 14
Location: China
a_h_k wrote:
Okay, so Run in AutohotkeyCE accepts parameters. Can Autohotkey (non-compiled/ahk) scripts receive parameters?
\My Documents
> Test.ahk
\My Documents\This Folder
> PassParam.ahk <--- run this
PassParam.ahk...
Code:
ScriptDir = "%A_Script_Dir%"
MsgBox Run "\My Documents\Test.ahk" %ScriptDir%
Run "\My Documents\Test.ahk" %ScriptDir%
Result:
> Run "\My Documents\Test.ahk" "\My Documents"
Test.ahk...
Code:
num_params = %0%
If num_params = 1
  ScriptDir = %1%
Else
  ScriptDir := A_ScriptDir
MsgBox num_params = %num_params%`nScriptDir = %ScriptDir%`nparam 1 = %1%
Result:
> num_params = 0 <--- ?!
> ScriptDir = \My Documents . . . (ie not "\My Documents\This Folder")
> param 1 =

seems that only executable file can receive para,you can not use a script to receive parameter,so the code should be like this:
Code:
run,"%A_AhkPath%" "%scriptpath%" "%para1%" "%para2%"


and this may be a bug when the "run" handling para with quote: the quoted para may be passed as non-quoted string unless the target executable file was quoted either.
for exmp. a script
Code:
run,\somepath\ahk.exe "\some path\somescript.ahk"
return a errnr msg cant find script "\some" ,so the para didn't passed with quote
and must be
Code:
run,"\somepath\ahk.exe" "\some path\somescript.ahk" "para1 with space" "p2 with space" "ect.."


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 10th, 2010, 10:24 am 
Offline

Joined: April 4th, 2010, 8:14 am
Posts: 14
Location: China
test again...THE compiled script can not run correctly,
for exmp:
a script
Code:
WhichButton := DllCall("MessageBox", "int", "0", "str", "Press Yes or No", "str", "Title of box", "int", 4)
MsgBox You pressed button #%WhichButton%.

when compiled,an error msgbox occured with"error at line 4
this line does not contain a recognized action"
some unrecognizable chars in it .i have tried ansi utf16 text,but seems no diff.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 453 posts ]  Go to page Previous  1 ... 22, 23, 24, 25, 26, 27, 28 ... 31  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: xXDarknessXx and 14 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