| View previous topic :: View next topic |
| Author |
Message |
Futurity
Joined: 13 Feb 2007 Posts: 21
|
Posted: Wed May 19, 2010 4:39 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Futurity
Joined: 13 Feb 2007 Posts: 21
|
Posted: Wed May 19, 2010 7:47 pm Post subject: |
|
|
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] |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Tue May 25, 2010 8:07 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Sat Jun 19, 2010 6:42 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Sat Jun 19, 2010 5:06 pm Post subject: |
|
|
| 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 Sat Jun 19, 2010 6:18 pm; edited 4 times in total |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Sat Jun 19, 2010 5:11 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Sat Jun 19, 2010 6:56 pm Post subject: |
|
|
| Wow, I've missed alot! Thanks for the excellent work Micha! Can't wait to play around with the new versions!! |
|
| Back to top |
|
 |
wei2005yh
Joined: 04 Apr 2010 Posts: 14 Location: China
|
Posted: Mon Jun 28, 2010 6:26 am Post subject: |
|
|
| the ahk2exe doesn't work at all,v372 uni .click at a compiled script = nothing.. |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Mon Jun 28, 2010 6:31 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Mon Jun 28, 2010 10:17 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Thu Jul 08, 2010 1:32 pm Post subject: |
|
|
Hi. Can "Run" accept parameters? _________________ My Ahk Site |
|
| Back to top |
|
 |
None
Joined: 28 Nov 2009 Posts: 3086
|
Posted: Thu Jul 08, 2010 4:25 pm Post subject: |
|
|
| a_h_k wrote: | | Hi. Can "Run" accept parameters? |
You mean like
| Code: | | Run Pword.exe \Program Files\AutoHotkeyCE\AutohotkeyCE.ahk | then yes |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Fri Jul 09, 2010 4:06 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
wei2005yh
Joined: 04 Apr 2010 Posts: 14 Location: China
|
Posted: Sat Jul 10, 2010 7:00 am Post subject: |
|
|
| 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.."
|
|
|
| Back to top |
|
 |
wei2005yh
Joined: 04 Apr 2010 Posts: 14 Location: China
|
Posted: Sat Jul 10, 2010 9:24 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|