 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
WM8505 Guest
|
Posted: Sun Jul 11, 2010 8:39 am Post subject: |
|
|
| I downloaded the last non-unicode version, but running AutoHotkeyCE.cab on my Mini-NetBook returns immediately showing a messagebox telling me that setup couldn`t be done. Should setup run on VIA WM8505 (ARM) SoC maschines? |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Tue Jul 27, 2010 11:55 pm Post subject: |
|
|
| WM8505 wrote: | | I downloaded the last non-unicode version, but running AutoHotkeyCE.cab on my Mini-NetBook returns immediately showing a messagebox telling me that setup couldn`t be done. Should setup run on VIA WM8505 (ARM) SoC maschines? |
Is the windows a WinCE variant?
If not, try the actual AutoHotkey program.
As far as I knew the only things that ran WinCE were some PDA's, PocketPCs (Windows Mobile Phones), and a couple other small electronics such as a few GPSes.
There could be tons more as I'm not expert by any means, but those are all that I know of. |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Tue Jul 27, 2010 11:57 pm Post subject: |
|
|
| wei2005yh wrote: | 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. |
I bet it's the ":=" characters.
I have a problem trying to use the += -= and so on variants.
I had to use the full on syntax such as EnvAdd and EnvSub, etc.
So try the couple different ways to write everything and report back please. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Thu Jul 29, 2010 2:28 am Post subject: |
|
|
The commands StringUpper/StringLower do not seem to work (I'm using the standard format)
Eg | Code: | letterL = a
StringUpper, letterU, letterL
MsgBox % letterU ;--> still lower "a" (ie the text is passed to letterU exactly as-is) |
Edit: Never mind .. Transform, Asc/Chr works fine
| Code: | LetterLower(letter)
{; A-Z (65-91) --> a-z (97-123) (+32)
letterU := letter , asciiU := Asc(letterU)
If (asciiU>64 and asciiU<92) ;65-91
asciiL := asciiU + 32
Else
asciiL := asciiU
letterL := Chr(asciiL)
return letterL
}
LetterUpper(letter)
{; a-z (97-123) --> A-Z (65-91) (-32)
letterL := letter , asciiL := Asc(letterL)
If (asciiL>96 and asciiL<124) ;97-123
asciiU := asciiL - 32
Else
asciiU := asciiL
letterU := Chr(asciiU)
return letterU
}
Asc(letter)
{
Transform, ascii, Asc, letter
return ascii
}
Chr(ascii)
{
Transform, letter, Chr, ascii
return letter
} |
(but i had to insert the top 2 functions into my script for it to work!) _________________ My Ahk Site |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Fri Jul 30, 2010 12:36 am Post subject: WinWaitActive() |
|
|
I created a WinWaitActive() function, as WinWaitActive command doesn't handle class
WinWaitActive, Title ahk_class Class
WinWaitActive, %Title% ahk_class %Class%
WinWaitActive, %Title_Class%
...all failed
| Code: | WinWaitActive(title, class="")
{
Loop
{
WinGetTitle, title1, A
WinGetClass, class1, A
IfWinActive, %title% ;uses current SetTitleMatchMode
{
If (class="")
return
If (class<>"" and class1=class)
return
}
Sleep 100
}
} |
So this should be ok as a temporary (or long-term!) workaround
Ps: Is there any particular reason why there are no functions are included with AutohotkeyCE? _________________ My Ahk Site
Last edited by a_h_k on Sun Aug 01, 2010 3:34 am; edited 1 time in total |
|
| Back to top |
|
 |
Micha as guest Guest
|
Posted: Sat Jul 31, 2010 12:15 am Post subject: |
|
|
| wei2005yh wrote: |
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.."
|
|
Hi, I'll have this fixed with the new version
Ciao
Micha |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Sat Jul 31, 2010 12:23 am Post subject: |
|
|
| wei2005yh wrote: | 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. |
Hi
I've compiled your script and it does run correctly
Ciao
Micha |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Sat Jul 31, 2010 12:30 am Post subject: |
|
|
| a_h_k wrote: | The commands StringUpper/StringLower do not seem to work (I'm using the standard format)
Eg | Code: | letterL = a
StringUpper, letterU, letterL
MsgBox % letterU ;--> still lower "a" (ie the text is passed to letterU exactly as-is) |
Edit: Never mind .. Transform, Asc/Chr works fine
|
Hi,
I have tried your script and the MessageBox shows an "A".
Could anybody else reproduce the problem?
Ciao
Micha |
|
| Back to top |
|
 |
Micha
Joined: 15 Nov 2005 Posts: 537 Location: Germany
|
Posted: Sat Jul 31, 2010 12:38 am Post subject: |
|
|
Uploaded V1.0.48.473
Ciao
Micha |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Sat Jul 31, 2010 7:35 pm Post subject: |
|
|
| Micha wrote: | Uploaded V1.0.48.473
Ciao
Micha |
Thanks again Micha! Love the excellent work you have been doing!
Also, I'll try and reproduce the results in the last few posts today or tomorrow. |
|
| Back to top |
|
 |
a_h_k
Joined: 02 Feb 2008 Posts: 627
|
Posted: Sun Aug 01, 2010 3:38 am Post subject: |
|
|
| a_h_k wrote: | The commands StringUpper/StringLower do not seem to work (I'm using the standard format)
Eg | Code: | letterL = a
StringUpper, letterU, letterL
MsgBox % letterU ;--> still lower "a" (ie the text is passed to letterU exactly as-is) |
|
| Micha wrote: | I have tried your script and the MessageBox shows an "A".
Could anybody else reproduce the problem? |
Btw, I'm using Windows Mobile 2003 SE
Edit: Just realized that using the NOT-MAINTAINED non-unicode version .. so installed maintained unicode version over it ---> now works
Also: | Micha wrote: | | Uploaded V1.0.48.473 | So should "Unicode-Build 1.0.48.387: AutohotkeyCEUni.cab" be now changed to "473"?
(on your main autohotkey.net page) _________________ My Ahk Site |
|
| Back to top |
|
 |
None
Joined: 28 Nov 2009 Posts: 3086
|
Posted: Tue Aug 10, 2010 1:29 am Post subject: |
|
|
FileSelecFile on the PPC won't start in a specified directory, look more than two folders deep in to the file tree, or look in folders other than My Doucments and the Storage Card. So with some input from a_h_k, I made a Function to replace FileSelectFile for use on PPC's that does all three. | Code: | Getfile(CurDir="\",Ext="*.*",Title="Select a File",Btn="Open") {
CurExt:=Ext
RetValue=Canceled
SingleClick=0 ;if 1 tap on file to open
;File types you want special names for
ahk= Autohotkey script (*.ahk)
txt= Text File (*.txt)
ini= Ini File (*.ini)
Global FileChoice
Global AddressBar
Global ExtDDl
lExt:=SubStr(Ext,3)
If (Ext="*.*")
extList = All files (*.*)||
Else If (%lExt%="")
extList = %Ext%||All files (*.*)
Else
extList:=%lExt% "||All files (*.*)"
Gui, 99:Add, Edit, x2 y2 h18 w235 vAddressBar ReadOnly, %CurDir%
Gui, 99:Add, ListBox, x2 w237 h170 vFileChoice gTest4Folder, % GetFileSubFun(CurDir,CurExt)
Gui, 99:Add, Text, x12, Type
Gui, 99:Add, DropDownList, x+10 w175 vExtDDL gChangeExt, %extList%
Gui, 99:Add, Button, x2 gUpOneLevel,^
Gui, 99:Add, Button, x+170 gCancelTheGet,Cancel
Gui, 99:Add, Button, x+-100 gGetTheFile,%Btn%
Gui, 99:Show,y25 w240 h245,%Title%
Sleep 100
WinWaitClose %Title%
Gui, 99:Destroy
Return RetValue
Test4Folder:
GuiControlGet, Selected ,, FileChoice
AttributeString := FileExist(CurDir Selected)
IfInString, AttributeString , D
{
CurDir=%CurDir%%Selected%\
GuiControl, , FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
GuiControl, , AddressBar,%CurDir%
}
Else If SingleClick
{
RetValue:=CurDir . Selected
Gui, 99:Cancel
}
Return
GetTheFile:
GuiControlGet, Selected ,, FileChoice
RetValue:=CurDir . Selected
Gui, 99:Cancel
Return
UpOneLevel:
If (CurDir="\")
Return
CurDir:=SubStr(CurDir,1,InStr(SubStr(CurDir,1,-1),"\",0,0))
GuiControl, , FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
GuiControl, , AddressBar,%CurDir%
Return
CancelTheGet:
Gui, 99:Cancel
Return
ChangeExt:
GuiControlGet, SelExt,, ExtDDL
If (SelExt = "All files (*.*)")
CurExt=*.*
Else
CurExt:=Ext
GuiControl,, FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
Return
}
GetFileSubFun(x,Type1) { ;function that gets list of file names
Loop %x%*.*,2,0 ;loop to get folders
Var1.=A_LoopFileName "|" ;store folders in var1
Loop %x%%Type1%,0,0 ;loop to get files
Var2.=A_LoopFileName "|" ;store files in var2
Sort, Var1, D| ;Sort var1
Sort, Var2, D| ;Sort var2
Return Var1 Var2 ;return the list of folders and files
} | Edit: decided an example of usage might help
| Code: | Fpath:=GetFile("\Program Files\AutoHotkeyCE\","*.ahk") ;look for script files starting in the AutoHotkeyCE folder
If (Fpath<>"Canceled") ;function returns Canceled if you hit cancel or close the gui
Run Pword.exe %Fpath% ;open the script with word
ExitApp ;Needed because the Gui in the function makes the script Persistent |
Last edited by None on Tue Aug 10, 2010 5:09 am; edited 1 time in total |
|
| Back to top |
|
 |
codybear
Joined: 15 Sep 2009 Posts: 560
|
Posted: Tue Aug 10, 2010 4:00 am Post subject: |
|
|
| None wrote: | FileSelecFile on the PPC won't start in a specified directory, look more than two folders deep in to the file tree, or look in folders other than My Doucments and the Storage Card. So with some input from a_h_k, I made a Function to replace FileSelectFile for use on PPC's that does all three. | Code: | Getfile(CurDir="\",Ext="*.*",Title="Select a File",Btn="Open") {
CurExt:=Ext
RetValue=Canceled
SingleClick=0 ;if 1 tap on file to open
;File types you want special names for
ahk= Autohotkey script (*.ahk)
txt= Text File (*.txt)
ini= Ini File (*.ini)
Global FileChoice
Global AddressBar
Global ExtDDl
lExt:=SubStr(Ext,3)
If (Ext="*.*")
extList = All files (*.*)||
Else If (%lExt%="")
extList = %Ext%||All files (*.*)
Else
extList:=%lExt% "||All files (*.*)"
Gui, 99:Add, Edit, x2 y2 h18 w235 vAddressBar ReadOnly, %CurDir%
Gui, 99:Add, ListBox, x2 w237 h170 vFileChoice gTest4Folder, % GetFileSubFun(CurDir,CurExt)
Gui, 99:Add, Text, x12, Type
Gui, 99:Add, DropDownList, x+10 w175 vExtDDL gChangeExt, %extList%
Gui, 99:Add, Button, x2 gUpOneLevel,^
Gui, 99:Add, Button, x+170 gCancelTheGet,Cancel
Gui, 99:Add, Button, x+-100 gGetTheFile,%Btn%
Gui, 99:Show,y25 w240 h245,%Title%
Sleep 100
WinWaitClose %Title%
Gui, 99:Destroy
Return RetValue
Test4Folder:
GuiControlGet, Selected ,, FileChoice
AttributeString := FileExist(CurDir Selected)
IfInString, AttributeString , D
{
CurDir=%CurDir%%Selected%\
GuiControl, , FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
GuiControl, , AddressBar,%CurDir%
}
Else If SingleClick
{
RetValue:=CurDir . Selected
Gui, 99:Cancel
}
Return
GetTheFile:
GuiControlGet, Selected ,, FileChoice
RetValue:=CurDir . Selected
Gui, 99:Cancel
Return
UpOneLevel:
If (CurDir="\")
Return
CurDir:=SubStr(CurDir,1,InStr(SubStr(CurDir,1,-1),"\",0,0))
GuiControl, , FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
GuiControl, , AddressBar,%CurDir%
Return
CancelTheGet:
Gui, 99:Cancel
Return
ChangeExt:
GuiControlGet, SelExt,, ExtDDL
If (SelExt = "All files (*.*)")
CurExt=*.*
Else
CurExt:=Ext
GuiControl,, FileChoice, % "|" GetFileSubFun(CurDir,CurExt)
Return
}
GetFileSubFun(x,Type1) { ;function that gets list of file names
Loop %x%*.*,2,0 ;loop to get folders
Var1.=A_LoopFileName "|" ;store folders in var1
Loop %x%%Type1%,0,0 ;loop to get files
Var2.=A_LoopFileName "|" ;store files in var2
Sort, Var1, D| ;Sort var1
Sort, Var2, D| ;Sort var2
Return Var1 Var2 ;return the list of folders and files
} |
|
Thanks None! This will help me tons with the projects I'm working on... |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 1163 Location: Seville, Spain
|
Posted: Tue Aug 10, 2010 7:56 pm Post subject: |
|
|
I've decided to try compiling AutoHotkeyCE Unicode with CeGCC & clean up the source/upgrade to latest AHK_L version. I'll post my progress here:
- I've downloaded the latest code from SVN & AHK_L L51 source for diffing. There are some changes that didn't get #ifdef WINCE'd...
- I've begun merging/adapting changes. For now DllCall(), RegisterCallback(), the debugger, the COM features and the File object have been disabled.
- After some messing around I got PCRE, AutoHotkey.cpp, Debugger.cpp, SimpleHeap.cpp, StringConv.cpp, TextIO.cpp, WinGroup.cpp, application.cpp, clipboard.cpp, globaldata.cpp, hook.cpp, hotkey.cpp, keyboard_mouse.cpp & os_version.cpp compiling! Next step: script.cpp. It gives tons of errors...
- Ok, script.cpp:
- Before merging I added a SmartBuf class that becomes a heap buffer on WinCE and a stack buffer on everything else. I also added support for the usage of _countof() with SmartBuf objects. This also reduced the clutter of new[] and delete[] when I merged.
- MSVC is very lenient and thus the code gives errors on GCC:
- A very nasty goto jump that skips initialization of a reference variable (ohai expression code!).
- "Type 1" errors: casts from const string to non-const string.
- "Type 2" errors: casts from VarSizeType() to void* in Script::GetVarType().
- "Type 3" errors: void* casts in the case expressions of the ATTR_LOOP_* switch block in Line::ExecUntil().
- __int64 is #define'd to long long, can't use C++ style cast on it: __int64(somevar)
- It compiles!
- script2.cpp, the long awaited sequel to script.cpp:
- I found the ugly truth about some built-in variables...
- Done merging, let's see...
- There's the Assign() overloading problem which is documented here...
- Attack of the goto jumps over variable initialization! (Line::PixelSearch() and Line::PerformSort())
- More casts from const string to non-const string.
- It compiles!
- script_autoit.cpp is next... I had to bring in MS' implementation of _wsplitpath() to make it compile...
- Oh boy, script_expression.cpp. Attack of the goto jumps over var initialization, part II! Fortunately, I was prepared... The same applies to script_gui.cpp.
- More files: script_menu.cpp, script_object.cpp, script_object_bif.cpp, script_registry.cpp, util.cpp, var.cpp, window.cpp, WinCEUtil.cpp, WinGroup.cpp
- Ohh, linking hell... There are undefined references to new and delete everywhere... No problem, I've replaced them now.
_________________ fincs
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]
Last edited by fincs on Fri Aug 13, 2010 9:49 am; edited 12 times in total |
|
| Back to top |
|
 |
henka
Joined: 12 Aug 2010 Posts: 1
|
Posted: Thu Aug 12, 2010 2:30 pm Post subject: |
|
|
Maybe this is a stupid question... I have downloaded and installed on my CE device the current latest Unicode version of AutoHotkeyCE.
But how do I actually send one or more Unicode characters?
I tried things like
Send, {U+0470}
Send, SometextwithUnicodeChars
But I did not succeed to be able to display the Unicode text in Pocketword.
Thanks for any reply.
Henk |
|
| 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
|