 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Futurity
Joined: 13 Feb 2007 Posts: 17
|
Posted: Tue Oct 27, 2009 10:21 pm Post subject: |
|
|
| fincs any news from Micha? |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 500 Location: Germany
|
Posted: Tue Nov 10, 2009 8:50 pm Post subject: |
|
|
Hi,
it took (too) long (1000 times sorry) but here is a new version. Minor bug-fixes and.... (drum roll):
fincs provided the complete code for dllcall.
Thank you very much for that. It's a great progress and important thing for ahkce.
Changelog: http://www.autohotkey.net/~Micha/AutohotkeyCE/html/Changelog.html
Ciao
Micha |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
Posted: Tue Nov 10, 2009 9:30 pm Post subject: |
|
|
Just one thing. I'm using this test script:
| Code: | #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
MsgBox Not dead 1
MsgBoxU(0, "Hello Unicode!", "Unicode is supposed to rock")
MsgBox Not dead 2
ExitApp
MsgBoxU(Options, Title, Text, HWND=0){
StandardUnicodeConvert(TitleU, Title)
StandardUnicodeConvert(TextU, Text)
DllCall("MessageBoxW", "uint", HWND, "uint", &TextU, "uint", &TitleU, "uint", Options)
}
StandardUnicodeConvert(ByRef Output, Input){
ILength := StrLen(Input)+1
VarSetCapacity(Output, ILength*2)
DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, "str", Input, "uint", ILength, "str", Output, "uint", ILength)
}
|
But it silently dies. What am I doing wrong?
EDIT: Ahh yeah. MultiByteToWideChar() doesn't exist in Windows Mobile 2003 >_<
EDIT2: You forgot to add the AutoHotkey executable to the CAB file! _________________ fincs
SciTE4AutoHotkey v2 script editor
[AutoHotkeyCE] [AutoHotkey_L] |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 500 Location: Germany
|
Posted: Wed Nov 11, 2009 8:51 pm Post subject: |
|
|
| fincs wrote: |
EDIT2: You forgot to add the AutoHotkey executable to the CAB file! |
Oops, thank you for reporting. I've reuploaded the file
Ciao
Micha
Edit: Bug found in dllcall. Strings must be converted (unicode<->ascii). Working on it |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
Posted: Wed Nov 11, 2009 10:12 pm Post subject: |
|
|
Ah, now the script works (after some MultiByteToWideChar tweaking)
Just one thing: when the script can't find a DLL function it crashes (and even hides the tray icon) but stays resident in memory. Is that normal? _________________ fincs
SciTE4AutoHotkey v2 script editor
[AutoHotkeyCE] [AutoHotkey_L] |
|
| Back to top |
|
 |
Micha as guest Guest
|
Posted: Wed Nov 11, 2009 10:38 pm Post subject: |
|
|
| fincs wrote: | Ah, now the script works (after some MultiByteToWideChar tweaking)
Just one thing: when the script can't find a DLL function it crashes (and even hides the tray icon) but stays resident in memory. Is that normal? |
Hi, I'll have a look at this, too
Ciao
Micha |
|
| Back to top |
|
 |
woj Guest
|
Posted: Thu Nov 12, 2009 10:29 am Post subject: |
|
|
Thanks for great tool!
Still, as I can confirm a number of AHK's functions working I just can't execute any program using "Run" (which is documented as "working"). I've tried with just the executable name from the same directory, path with backslashes, path with slashes - I always receive ErrorLevel 0 but nothing happens... What should I check/fix? |
|
| Back to top |
|
 |
micha as guest Guest
|
Posted: Thu Nov 12, 2009 6:50 pm Post subject: |
|
|
| woj wrote: | Thanks for great tool!
Still, as I can confirm a number of AHK's functions working I just can't execute any program using "Run" (which is documented as "working"). I've tried with just the executable name from the same directory, path with backslashes, path with slashes - I always receive ErrorLevel 0 but nothing happens... What should I check/fix? |
Hi,
I've tested | Code: |
run, calendar.exe
sleep, 1000
MsgBox, calendar started
run, \program files\AutohotkeyCE\ahk2exe.exe
sleep, 1000
MsgBox, AHKCompiler started
run, fantasy.wma
sleep, 1000
msgbox, playing fantasy.wma |
and it worked well.
Please give me an example what you have tried so far
Ciao
Micha |
|
| Back to top |
|
 |
randallf
Joined: 06 Jul 2009 Posts: 482
|
|
| Back to top |
|
 |
woj Guest
|
Posted: Fri Nov 13, 2009 10:33 am Post subject: |
|
|
As I have no calendar I try with
| Code: | IfExist \windows\pword.exe
{
MsgBox Pocket Word exists!
} | and get the confirmation.
What is starting Pocket Word properly:
| Code: | Send {LWin}
WinWaitActive,XXXXX,,1
Send r
WinWaitActive,XXXXX,,1
Send {ASC 92}windows{ASC 92}pword.exe{Enter} |
What is showing messagebox with 0 and nothing more happens:
| Code: | Run,\windows\pword.exe,,UseErrorLevel
MsgBox %ErrorLevel% |
Perhaps I miss something in the custom system image but what should I ask to be added? |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 500 Location: Germany
|
Posted: Fri Nov 13, 2009 12:16 pm Post subject: Re: Autohotkey for Pocket PCs / WinCE |
|
|
Hi, sorry if this is missunderstandable,
there is of course an api, but some api-calls just do not exist on CE.
Ciao
Micha |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 500 Location: Germany
|
Posted: Fri Nov 13, 2009 12:50 pm Post subject: |
|
|
@woj
which version do you use. Old versions aren't working well.
I'll have a look at it at home.
Edit: pword can be started with your code. V31 should be working. I'll upload V32 the next few days with more bigfixes.
Ciao
Micha |
|
| Back to top |
|
 |
woj Guest
|
Posted: Mon Nov 16, 2009 9:29 am Post subject: |
|
|
I've been using V31, the latest at the time.
Now with V32 'the Run is running'
Thanks a lot! That's great to have a scripting engine on CE!
I've a different question, perhaps I am not the only one experiencing that kind of problem: I have to use sleeps in scripts instead of 'WinWaitActive' because the latter SOMETIMES seems "hanging" even though there is a window visible and active. Using the "Open" context menu I can confirm waiting on 'WinWaitActive'... Can it be the Input Panel coming in the way? I've been ignoring it flashing visible/invisible during the script... Can I do something? |
|
| Back to top |
|
 |
Micha as guest Guest
|
Posted: Mon Nov 16, 2009 12:52 pm Post subject: |
|
|
| woj wrote: | | ...I have to use sleeps in scripts instead of 'WinWaitActive' because the latter SOMETIMES seems "hanging"... |
Hi, WinWaitactive waits till the window is in foreground. It does not try to bring it to the front.
Perhaps you can try WinActive:
| Quote: | | Six attempts will be made to activate the target window over the course of 60ms. Thus, it is usually unnecessary to follow WinActivate with WinWaitActive. |
Does the script continue running if you manually activates the window?
Perhaps it's still a bug in the function or the window title does not fully match. Can you give an example? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|