AutoHotkey Community

It is currently May 27th, 2012, 9:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: AHK for Pocket PCs
PostPosted: March 17th, 2006, 2:12 pm 
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? :P


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2006, 3:17 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
I was wondering why nobody asked before... :-)
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...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2006, 4:07 pm 
Offline

Joined: March 16th, 2005, 10:33 pm
Posts: 969
Location: Frisia
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

:?:

_________________
Image mirror 1mirror 2mirror 3ahk4.me • PM or Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2006, 6:18 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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?).

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 17th, 2006, 11:35 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 19th, 2006, 5:44 pm 
Offline

Joined: January 27th, 2005, 3:28 pm
Posts: 120
Location: Germany, Dresden
(I was the guest, sometimes I become logged of by unknown reasons :oops: , And no notifications :( )

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). :(

The question is: how to find another Chris with a portion of pocket computing enthusiasm… :?:

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2006, 6:39 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2006, 10:09 am 
Offline

Joined: January 27th, 2005, 3:28 pm
Posts: 120
Location: Germany, Dresden
I know mortscript. It can't receive stylus taps. The key and event handling is not as powerful as AHK. No GUI :(
But Mort may become the Chris of the PPC-World in future. :wink:

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 30th, 2006, 11:00 pm 
Offline

Joined: July 6th, 2006, 7:26 pm
Posts: 48
Location: Poland
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/deta ... layLang=en

Windows Mobile 5.0 SDK for Pocket PC:
http://www.microsoft.com/downloads/deta ... laylang=en

SDK for Windows Mobile 2003-based (previous version of Windows Mobile - most popular) Pocket PCs:
http://www.microsoft.com/downloads/deta ... laylang=en

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

Regards


Report this post
Top
 Profile  
Reply with quote  
 Post subject: PPC scripts
PostPosted: December 26th, 2006, 5:38 am 
ForwardPass, freeware, can still be found, works well on 2002, 2003, and well enough on WM5. Uses vbscript or jscript.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 23rd, 2007, 7:37 pm 
Offline

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2007, 1:15 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 31st, 2007, 11:39 am 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
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 December 31st, 2007, 1:38 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 31st, 2007, 11:56 am 
Offline

Joined: July 6th, 2006, 7:26 pm
Posts: 48
Location: Poland
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 :-)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 31st, 2007, 1:39 pm 
Offline

Joined: November 15th, 2005, 11:15 am
Posts: 537
Location: Germany
Hi Tester, thank you for your kind words.
I will contact Mirko.
Ciao
Micha


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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