AutoHotkey Community

It is currently May 23rd, 2012, 4:40 am

All times are UTC [ DST ]


Search found 22 matches
Search these results:

Author Message

 Forum: Scripts   Topic: AHKArray [Real Array - One Variable] [Version 6]

Posted: May 5th, 2008, 8:41 am 

Replies: 96
Views: 31930


If you want to use a string this would work: Thanks for the explanation. Second, AHKANewArray takes either 0 parameters, or 2. Never 1. I found it being kinda strange, because prototype of AHKASplit looks like AHKASplit(String,Char="",CaseSensitive=false) where 2 from 3 parameters...

 Forum: Scripts   Topic: AHKArray [Real Array - One Variable] [Version 6]

Posted: May 4th, 2008, 12:47 pm 

Replies: 96
Views: 31930


Hm, it seems that this simple code hangs AHKA:
Code:
myarr := AHKANewArray("[A, B, [C1, C2], D, [E1, [E2i, E2ii, E2iii], E3], F]")

(I tried to use the latest version, 5.42)

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: February 4th, 2008, 11:38 am 

Replies: 18
Views: 1771


lexiKos, thank you for the replies, I appreciate your help! I don't understand your aversion to GlobalAlloc. The problems I see with your current method are: ⋅  _this_%..% can never be deleted. ⋅ No "object" (the contents of _this_%..% ) can ever be deleted, since you n...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: February 1st, 2008, 6:04 am 

Replies: 18
Views: 1771


Aha, I finally have found some solution! We need to use one basic function, Object_new(size) that allocates memory and returns integer numerically equal to the pointer to the memory. In this very first version I'm using global array to prevent object be disposed too early. Maybe in a future version ...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 31st, 2008, 2:47 pm 

Replies: 18
Views: 1771


Take a look at the second example in the post I linked to earlier (also below). GlobalAlloc returns a pointer to allocated memory. Pointers can be passed to and from functions, since they are simply numbers... I consider GlobalAlloc as the last way to try, because it has obvious disadvantage - need...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 31st, 2008, 2:45 pm 

Replies: 18
Views: 1771


First, it is not possible to use ByRef parameters because we sometimes have to return an object, Simple use getXY(xy) instead of xy := getXY() This also solves the constructor issue: Bug_new(ByRef this, x) { global MAXS VarSetCapacity(this, (MAXS + 1) * 4, 0...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 31st, 2008, 12:07 pm 

Replies: 18
Views: 1771


Perhaps Guest meant procedural code vs. objects in general, or maybe using AutoHotkey pseudo-arrays. I did a little step towards emulating OOP, although met with several obstacles. First, it is not possible to use ByRef parameters because we sometimes have to return an object, like in the java code...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 31st, 2008, 11:01 am 

Replies: 18
Views: 1771


Tuncay wrote:
Are you RaptoR?? If you mean this in an ironical way ... so I don´t know why.


Noooo! Guest is not me, dont be confused so easy! :-)

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 28th, 2008, 11:38 am 

Replies: 18
Views: 1771


Anonymous wrote:
I would forget the java code style and write it in AHK syntax style.

Could you please show me, what AHK syntax style is? IMHO, concepts are independent of the language.

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 28th, 2008, 11:36 am 

Replies: 18
Views: 1771


The answer depends on how the data is stored. If the objects have a static number of numeric fields, VarSetCapacity and NumPut/NumGet would probably be most efficient. If the objects have arrays or string fields, Scripting.Dictionary would be easier. Have a look at the above link, then decide wheth...

 Forum: Support   Topic: OOP or how to create the equivalent

Posted: January 27th, 2008, 10:34 am 

Replies: 18
Views: 1771


Hi all! I am trying to convert the following program in Java into AHK, but get stuck in finding more or less acceptable equivalent :-( Here is java code: /// public class MyCollection { public static final int MAXL = 20; public static final int MAXS = 10; Loc[] locs = new Loc[MAXL]; int size = ...

 Forum: Scripts   Topic: For the coders - Automatic comment box

Posted: January 21st, 2008, 1:46 pm 

Replies: 9
Views: 7045


I did a cursory search of this forum for utility or function to automatically build a comment box (not exactly sure what to search for) but I didn't find anything. ... I hope someone finds this useful. JBalli, that's awesome! PLT Scheme also has similar feature, but it is "semicolon oriented&q...

 Forum: Suggestions   Topic: real thread handling

Posted: January 21st, 2008, 12:13 pm 

Replies: 28
Views: 10379


Thread programming is known to be tricky and quite complex: after running tasks in parallels, people will ask ways to synchronize threads, to share data between threads, and so on. A real Pandora box! :-) It is not necessary to be that complex :-) Take a look at Erlang , the language that was used ...

 Forum: Offtopic   Topic: Python

Posted: July 9th, 2007, 4:04 pm 

Replies: 8
Views: 1437


degarb , Python is conceptually complete full-fledged programming language, it is not intended to provide only support for some tool. It can be integrated in any program in variety of languages (Java, C, C++, .net etc). 1. Can python be as easily learned as AHK (downloaded ahk, compiled and edited ...

 Forum: Offtopic   Topic: What Editor do you use for AHK programming?

Posted: July 9th, 2007, 1:56 pm 

Replies: 45
Views: 9346


jonib,
Quote:
Have you checked out FAR manager plugins?

Oh, yes! 90% of the power of this tool is its wide extensibility. 8)

btw: I wrote by myself hrc shemas for TXL (it is special program-to-program transformation language), Erlang and Haskell (although it is still work-in-progress).
Sort by:  
Page 1 of 2 [ Search found 22 matches ]


All times are UTC [ DST ]


Powered by phpBB® Forum Software © phpBB Group