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 

AHK for Pocket PCs
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Mar 17, 2006 2:12 pm    Post subject: AHK for Pocket PCs Reply with quote

This wish is probably the greatest wish in this sub forum:
I love AHK and I'm suffering from a lack in scripting languages for Pocket PCs. It's a pity my pocket computer isn't able to be optimized by self made scripts.
Dear Chris – please could you build an AHK-Version for Pocket PCs????
This would be a revolution in the Pocket PC world. Moreover this way the new scripting language could be AHK like. So AHK users would have a pole position in pocket scripting.
How can we help to make this dream come true? Razz
Back to top
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Fri Mar 17, 2006 3:17 pm    Post subject: Reply with quote

I was wondering why nobody asked before... Smile
Anonymous Guest wrote:
How can we help to make this dream come true?

By offering a Pocket PC to Chris? Perhaps with full development environment...
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
daonlyfreez



Joined: 16 Mar 2005
Posts: 740
Location: Berlin

PostPosted: Fri Mar 17, 2006 4:07 pm    Post subject: Reply with quote

Even if someone would donate this, and if Chris would be able and willing to... which OS?

- Windows Mobile v 2000
- Windows Mobile v 2002
- Windows Mobile v 2003
- PalmOS
- Symbian
- Blackberry

Question
_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Fri Mar 17, 2006 6:18 pm    Post subject: Reply with quote

Obviously, one or all flavors of Windows Mobile.
These are derivatives (limited) versions of Windows Desktop, so adapting code would be less a pain than recreating everything for another OS.
Note 1: since we have code, somebody else can do that, I guess Chris has enough work on his arms for the Desktop Windows...
Note 2: keyboard hotkey, mouse? I suppose there are equivalents, but I guess a lot of features would be lost (are there hooks?).
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10465

PostPosted: Fri Mar 17, 2006 11:35 pm    Post subject: Reply with quote

It will probably be a long time before I do any porting to other platforms, if ever. Before then, I'd be likely to work on a Unicode version and/or a 64-bit version for desktop PCs.

Of course, this doesn't preclude anyone else from porting some or all of the features. However, I'm expect it would be a major undertaking if the mobile OS in question is signficantly different in capabilities and API.
Back to top
View user's profile Send private message Send e-mail
halweg



Joined: 27 Jan 2005
Posts: 102
Location: Germany, Dresden

PostPosted: Sun Mar 19, 2006 5:44 pm    Post subject: Reply with quote

(I was the guest, sometimes I become logged of by unknown reasons Embarassed , And no notifications Sad )

The OS version should be Windows Mobile (mainly v 2003, even if v 2005 is the actual version).
I think a half of the work when building a scripting language is to create a syntax. Why not use an existing scripting syntax when building a new language.

I don't know the details about Win APIs a. s. o. but there must be some portability. At least in the .net-environment.

PhiLho wrote:
Note 1: since we have code, somebody else can do that, I guess Chris has enough work on his arms for the Desktop Windows...

There are a lot of (especially Russian) programming companies that could do this. But perhaps they want some money back from customers, so I ask myself if a free software model is possible in this case .
PhiLho wrote:
Note 2: keyboard hotkey, mouse? I suppose there are equivalents, but I guess a lot of features would be lost (are there hooks?).

There is a stylus instead of a mouse. And some Keys. All existing PPC macro languages make something like "make a stylus tap at a screen position", "start any program" …
But there are no real simple scripting languages that could make a little bit more (like detect a stylus tap on any screen position). Sad

The question is: how to find another Chris with a portion of pocket computing enthusiasm… Question
_________________
Back to top
View user's profile Send private message
J Higs
Guest





PostPosted: Sun Sep 03, 2006 6:39 am    Post subject: Reply with quote

Well, it may not be exactly the same as AutoHotKeys, but I found a scripting language called MortScript for the pocket pc that is very similar and very useful. (Also free) You can check it out here:

http://www.sto-helit.de/modules/edito/content.php?id=38
Back to top
halweg



Joined: 27 Jan 2005
Posts: 102
Location: Germany, Dresden

PostPosted: Sun Sep 03, 2006 10:09 am    Post subject: Reply with quote

I know mortscript. It can't receive stylus taps. The key and event handling is not as powerful as AHK. No GUI Sad
But Mort may become the Chris of the PPC-World in future. Wink
_________________
Back to top
View user's profile Send private message
Tester



Joined: 06 Jul 2006
Posts: 47
Location: Poland

PostPosted: Thu Nov 30, 2006 11:00 pm    Post subject: Reply with quote

If anyone is interested to porting AHK to PocketPC there are few interesting links regards to PocketPCs SKD and emulation:

Quick overview how to install PocketPC emulator on Desktop PC:
http://www.pocketpcfaq.com/faqs/5.0/emulator.htm

Microsoft Device Emulator 1.0 with Windows Mobile OS Images (only PocketPC emulator - no SDK) about 60MB:
http://www.microsoft.com/downloads/details.aspx?FamilyID=c62d54a5-183a-4a1e-a7e2-cc500ed1f19a&DisplayLang=en

Windows Mobile 5.0 SDK for Pocket PC:
http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en

SDK for Windows Mobile 2003-based (previous version of Windows Mobile - most popular) Pocket PCs:
http://www.microsoft.com/downloads/details.aspx?familyid=9996B314-0364-4623-9EDE-0B5FBB133652&displaylang=en

I'm interested too in AHK working on PocketPCs - even rough compiled with some functionality bugs (but working). Wink

Regards
Back to top
View user's profile Send private message
cliffn
Guest





PostPosted: Tue Dec 26, 2006 5:38 am    Post subject: PPC scripts Reply with quote

ForwardPass, freeware, can still be found, works well on 2002, 2003, and well enough on WM5. Uses vbscript or jscript.
Back to top
Micha



Joined: 15 Nov 2005
Posts: 433
Location: Germany

PostPosted: Sun Dec 23, 2007 7:37 pm    Post subject: Reply with quote

Hi, I've tried to compile it.
I had to fix about 2000 compile error.
Most functions does not exist with WinCE, so most functions will not work.
Only unicode is supported. Every string has to be changed
"test" -> _T("test")
MakeUpperA -> MakeUpperW

I've commented out about 60% of the AHK-code just to get it compiled.

To link you have to add lib-files for some functions manually.

After 3 days work it links but does not run.
strlen ("test") returns 4
char *SimpleHeap::Malloc(size_t aSize) allocates 4 bytes
but the string is unicode so the resulting string just contains "te"

I don't know if I find enough time to continue.... so it can last a little bit.

Perhaps I made the mistake to take the latest sources. Perhaps Autohotkey 0.1 would be easier to compile...

Ciao
Micha
Back to top
View user's profile Send private message
AHKnow*
Guest





PostPosted: Thu Dec 27, 2007 1:15 am    Post subject: Reply with quote

It would seem that almost any version of AutoHotkey would be of use for a Pocket PC. Even if it was an earlier version, AutoHotkey on WinCE should be pretty awesome.
Back to top
Micha



Joined: 15 Nov 2005
Posts: 433
Location: Germany

PostPosted: Mon Dec 31, 2007 11:39 am    Post subject: Reply with quote

Hi, the last days I tried to get it running again.
I've started from the beginning.
There are 2 approaches:
1. Changing everything in AHK to unicode (char -> WCHAR, strlen->wcslen, "text"->_T("text")... ... ...) that didn't run after linking. I had to change hundreds (!) of lines of code.

2. Now I've tried to change as less as I can (nevertheless there are lotslotslots of changes). After days it compiles but didn't run.

I've tried to run it in Microsoft PocketPC Emulator and it crashes when trying to allocate memory
Code:
      if (Line::sMaxSourceFiles)
      {
         new_max = 2*Line::sMaxSourceFiles;
         if (new_max > ABSOLUTE_MAX_SOURCE_FILES)
            new_max = ABSOLUTE_MAX_SOURCE_FILES;
      }
      else
         new_max = 10;
      // For simplicity and due to rarity of every needing to, expand by reallocating the array.
      // Use a temp var. because realloc() returns NULL on failure but leaves original block allocated.
      //MSI char **realloc_temp = (char **)realloc(Line::sSourceFile, new_max*sizeof(char *)); // If passed NULL, realloc() will do a malloc().
      char **realloc_temp = (char **)malloc(new_max*sizeof(char *)); // If passed NULL, realloc() will do a malloc().
      if (!realloc_temp)


If new_max is 100 the realloc statement crashes. After changing it to 10 it worked.

Next crash:
After reading the first command from the ahk-file ParseAndAddLine is called.
Before the first statement is done the emulator crashes (just before the first {.
The this-pointer is null.
Code:
[Stack fault]: Thread=8dacd2cc Proc=8c247550 'AutohotkeyCE.exe'
AKY=00004001 PC=0002e030 RA=0002db84 BVA=1e100ba4 FSR=00000405
Unhandled exception at 0x0002e030 in AutohotkeyCE.exe: 0xC00000FD: Stack overflow.


Code:
ResultType Script::ParseAndAddLine(char *aLineText, ActionTypeType aActionType, ActionTypeType aOldActionType
   , char *aActionName, char *aEndMarker, char *aLiteralMap, size_t aLiteralMapLength)
// Returns OK or FAIL.
// aLineText needs to be a string whose contents are modifiable (though the string won't be made any
// longer than it is now, so it doesn't have to be of size LINE_SIZE). This helps performance by
// allowing the string to be split into sections without having to make temporary copies.
{ <- crash
//#ifdef _DEBUG
//   if (!aLineText || !*aLineText)
//      return ScriptError("DEBUG: ParseAndAddLine() called incorrectly.");
//#endif


There are just a few calls in the stack, so there's no endless recursion
Code:
>   AutohotkeyCE.exe!Script::LoadIncludedFile(char* aFileSpec = 0x00110130, bool aAllowDuplicateInclude = false, bool aIgnoreLoadFailure = false) Line: 1058, Byte Offsets: 0x90   C++
    AutohotkeyCE.exe!Script::LoadFromFile(bool aScriptWasNotspecified = false) Line: 925, Byte Offsets: 0x368   C++
    AutohotkeyCE.exe!WinMain(HINSTANCE__* hInstance = 0x2dacd50a, HINSTANCE__* hPrevInstance = 0x00000000, wchar_t* lpCmdLine = 0x1e10fed8, int nCmdShow = 5) Line: 216, Byte Offsets: 0x538   C++
    AutohotkeyCE.exe!WinMainCRTStartup(HINSTANCE__* hInstance = CXX0065: Error: unable to obtain expression value, HINSTANCE__* hInstancePrev = 0x000eac78, unsigned short* lpszCmdLine = 0x00110130, int nCmdShow = 0) Line: 21, Byte Offsets: 0x38   C
    0x03f87210   


Perhaps the problem is the small memory in a PocketPC. But I almost know nothing about PocketPC-programming.

Does somebody have ideas?
Ciao
Micha

Edit:
I've found the following at http://www.firstobject.com/dn_markwince.htm
Quote:
Embedded Visual C++ warning LNK1166 medica 10-Oct-2006
I'm testing your CMarkup 8.2 at the moment. When I compile my project with embedded visual c++ (Windows CE) I always get the warning:
Markup.obj : warning LNK1166: cannot adjust code at offset=0x00001000, rva=0x0001CCE4

Try the /Gy compiler option. If the warning remains, based on my googling the warning apparently means it would be necessary to rewrite large functions into multiple smaller ones for the code to work correctly on certain TI 925 chips due to a bug on those chips


I've tried the compiler switch /Gy, but 1 of the 4 messages remains. I fear that some functions must be rewritten.


Last edited by Micha on Mon Dec 31, 2007 1:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tester



Joined: 06 Jul 2006
Posts: 47
Location: Poland

PostPosted: Mon Dec 31, 2007 11:56 am    Post subject: Reply with quote

Micha wrote:
Does somebody have ideas?
The only guy I known, which does many high-quality (and free!) stuff on PPC is Mirko Schenk - author of the MortPlayer and MortScript (it is veryveryvery simple scripting engine for PPC; of course AHK is much more complicated).

Some time ago, when I struggle with PPC platform I exchange few posts with him. He is very friendly and supportive. Because both of you live in German you can communicate easily.
Maybe try send him some question about this error in Private Message on this forum:
http://www.sto-helit.de/forum/?lang=en

Anyway - big respect to you for try to compile AHK on PPC Smile
Back to top
View user's profile Send private message
Micha



Joined: 15 Nov 2005
Posts: 433
Location: Germany

PostPosted: Mon Dec 31, 2007 1:39 pm    Post subject: Reply with quote

Hi Tester, thank you for your kind words.
I will contact Mirko.
Ciao
Micha
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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