AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autohotkey for Pocket PCs / WinCE / Smartphones
Goto page Previous  1, 2, 3 ... 24, 25, 26 ... 28, 29, 30  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Futurity



Joined: 13 Feb 2007
Posts: 21

PostPosted: Wed May 19, 2010 4:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
Futurity



Joined: 13 Feb 2007
Posts: 21

PostPosted: Wed May 19, 2010 7:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Micha



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Tue May 25, 2010 8:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 627

PostPosted: Sat Jun 19, 2010 6:42 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Micha



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Sat Jun 19, 2010 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Micha



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Sat Jun 19, 2010 5:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
codybear



Joined: 15 Sep 2009
Posts: 560

PostPosted: Sat Jun 19, 2010 6:56 pm    Post subject: Reply with quote

Wow, I've missed alot! Thanks for the excellent work Micha! Can't wait to play around with the new versions!!
Back to top
View user's profile Send private message
wei2005yh



Joined: 04 Apr 2010
Posts: 14
Location: China

PostPosted: Mon Jun 28, 2010 6:26 am    Post subject: Reply with quote

the ahk2exe doesn't work at all,v372 uni .click at a compiled script = nothing..
Back to top
View user's profile Send private message Send e-mail
Micha



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Mon Jun 28, 2010 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
codybear



Joined: 15 Sep 2009
Posts: 560

PostPosted: Mon Jun 28, 2010 10:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 627

PostPosted: Thu Jul 08, 2010 1:32 pm    Post subject: Reply with quote

Hi. Can "Run" accept parameters?
_________________
My Ahk Site
Back to top
View user's profile Send private message Visit poster's website
None



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Thu Jul 08, 2010 4:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
a_h_k



Joined: 02 Feb 2008
Posts: 627

PostPosted: Fri Jul 09, 2010 4:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
wei2005yh



Joined: 04 Apr 2010
Posts: 14
Location: China

PostPosted: Sat Jul 10, 2010 7:00 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
wei2005yh



Joined: 04 Apr 2010
Posts: 14
Location: China

PostPosted: Sat Jul 10, 2010 9:24 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 24, 25, 26 ... 28, 29, 30  Next
Page 25 of 30

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group