AutoHotkey Community

It is currently May 27th, 2012, 3:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 453 posts ]  Go to page Previous  1 ... 23, 24, 25, 26, 27, 28, 29 ... 31  Next
Author Message
 Post subject:
PostPosted: July 11th, 2010, 9:39 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2010, 12:55 am 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 28th, 2010, 12:57 am 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 29th, 2010, 3:28 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: WinWaitActive()
PostPosted: July 30th, 2010, 1:36 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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 August 1st, 2010, 4:34 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2010, 1:15 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2010, 1:23 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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.

Image
Hi
I've compiled your script and it does run correctly
Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2010, 1:30 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2010, 1:38 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
Uploaded V1.0.48.473
Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 31st, 2010, 8:35 pm 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2010, 4:38 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
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 :D

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2010, 2:29 am 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
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 August 10th, 2010, 6:09 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2010, 5:00 am 
Offline

Joined: September 15th, 2009, 1:14 am
Posts: 562
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...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 10th, 2010, 8:56 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
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
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Last edited by fincs on August 13th, 2010, 10:49 am, edited 12 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 12th, 2010, 3:30 pm 
Offline

Joined: August 12th, 2010, 3:24 pm
Posts: 1
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 453 posts ]  Go to page Previous  1 ... 23, 24, 25, 26, 27, 28, 29 ... 31  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 22 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group