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 ... 25, 26, 27, 28, 29, 30  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
WM8505
Guest





PostPosted: Sun Jul 11, 2010 8:39 am    Post subject: Reply with quote

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

PostPosted: Tue Jul 27, 2010 11:55 pm    Post subject: Reply with quote

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



Joined: 15 Sep 2009
Posts: 560

PostPosted: Tue Jul 27, 2010 11:57 pm    Post subject: Reply with quote

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



Joined: 02 Feb 2008
Posts: 627

PostPosted: Thu Jul 29, 2010 2:28 am    Post subject: Reply with quote

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 Smile

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



Joined: 02 Feb 2008
Posts: 627

PostPosted: Fri Jul 30, 2010 12:36 am    Post subject: WinWaitActive() Reply with quote

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





PostPosted: Sat Jul 31, 2010 12:15 am    Post subject: Reply with quote

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

PostPosted: Sat Jul 31, 2010 12:23 am    Post subject: Reply with quote

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



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Sat Jul 31, 2010 12:30 am    Post subject: Reply with quote

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 Smile

Hi,
I have tried your script and the MessageBox shows an "A".
Could anybody else reproduce the problem?
Ciao
Micha
Back to top
View user's profile Send private message
Micha



Joined: 15 Nov 2005
Posts: 537
Location: Germany

PostPosted: Sat Jul 31, 2010 12:38 am    Post subject: Reply with quote

Uploaded V1.0.48.473
Ciao
Micha
Back to top
View user's profile Send private message
codybear



Joined: 15 Sep 2009
Posts: 560

PostPosted: Sat Jul 31, 2010 7:35 pm    Post subject: Reply with quote

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



Joined: 02 Feb 2008
Posts: 627

PostPosted: Sun Aug 01, 2010 3:38 am    Post subject: Reply with quote

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 Very Happy

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



Joined: 28 Nov 2009
Posts: 3086

PostPosted: Tue Aug 10, 2010 1:29 am    Post subject: Reply with quote

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



Joined: 15 Sep 2009
Posts: 560

PostPosted: Tue Aug 10, 2010 4:00 am    Post subject: Reply with quote

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



Joined: 05 May 2007
Posts: 1163
Location: Seville, Spain

PostPosted: Tue Aug 10, 2010 7:56 pm    Post subject: Reply with quote

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



Joined: 12 Aug 2010
Posts: 1

PostPosted: Thu Aug 12, 2010 2:30 pm    Post subject: Reply with quote

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