 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Mon Dec 10, 2007 2:01 pm Post subject: |
|
|
Wow, when did the thread grow this big?
My original reason using zip was what Titan said:
| Titan wrote: | | Archiving allows authors to add auxiliary files without changing links so I suppose there are practical reasons for using them. |
Later, I realized it might be also useful for What Skan said:
| Skan wrote: | | Maybe Sean does not like his code being copy pasted without proper reference to the source. When you download and extract a file out of it, the filestamp is original and it is clear you have to contact the author for a special license. |
And, I almost regard zip as the folder, so I chose zip even though it's not my favorite archiver. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3652 Location: Belgrade
|
Posted: Mon Dec 10, 2007 4:11 pm Post subject: |
|
|
| Quote: | Quote:
I support AutoHotkey getting some type of 'namespace' syntax,
As do we all, I suppose. |
I suppose the patre doesn't want it, nor the chickens. Only Binary addicted AHK users...
| lex wrote: | | What is more specialized than this script? |
I can answer that.
Its specialized version of your script
| lex wrote: | | For those that are interested, I have uploaded an outline of some of the structures (Var, Line, Func, etc.) accessible by the script. | It was about time. I hope Sean will follow instead leaving all that COM things uncommented. No wonder why 0 ppl != Sean wrote COM server.
| lex wrote: | | I have added a static variable to __init so it only does something on the first call |
Just wait for Titan to show up. Its 1 comparison more on each eval FFS.
| Guest wrote: | | ...yes, but most of the time I just wanna read the code...& I never want to dig into a rar, unless the contents are something I REALLY want. |
Oh, isn't that terrible ....
| Skan quoting Titan wrote: | | Archiving allows authors to add auxiliary files without changing links so I suppose there are practical reasons for using them. | Well, according to guest, you should post all AHK files from the archive as links to text and skip all other unimportant things, like icons and sht.
2Guest
What about your name Guest Too buisy unpacking RARs ? _________________
 |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4078 Location: Pittsburgh
|
Posted: Mon Dec 10, 2007 4:17 pm Post subject: |
|
|
| Moderator: could you split this thread into two: the technical part, with the Low Level Engine Access and to the philosophical discussions about zip, name spaces, security, etc.? It is hard to find now the info on the low level functions. |
|
| Back to top |
|
 |
Moderator! Guest
|
Posted: Mon Dec 10, 2007 4:28 pm Post subject: |
|
|
| sure, awaiting a "go-ahead" from lexikos. |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 425 Location: Galil, Israel
|
Posted: Mon Dec 10, 2007 5:23 pm Post subject: |
|
|
| Sean wrote: | My original reason using zip was what Titan said:
| Titan wrote: | | Archiving allows authors to add auxiliary files without changing links so I suppose there are practical reasons for using them. |
|
my own .02 cents:
even an older version actually IN THE FORUM, allows (1) SEARCHING for things in the code, and (2) Getting to see the code INSTANTLY as you look over the forum.
hiding code in a zip or rar... not make it easy to find later, (based on code), or to look at quickly...
anyhow... _________________ Joyce Jamce |
|
| Back to top |
|
 |
Joy2DWorld
Joined: 04 Dec 2006 Posts: 425 Location: Galil, Israel
|
Posted: Mon Dec 10, 2007 5:30 pm Post subject: |
|
|
| lexikos wrote: |
| Joy2DWorld wrote: | | actually, was suggesting LIBRARY NAME of "Eval", | "Eval" is too specific. The script was not and is not intended solely for evaluating dynamic expressions. In fact, I added __expr mainly to make use of __MakeExpressionArg, which will be used to generate dynamic code - i.e. for insertion into the script rather than one-time evaluation.
|
indeed AMAZINGLY COOL. (even if have not unwrapped enough to fully understand entirely)...
mere suggest that dynamic code is after all, subset of eval.
but, hey, what do i know. _________________ Joyce Jamce |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Mon Dec 10, 2007 5:53 pm Post subject: |
|
|
| majkinetor wrote: | | lex wrote: | | I have added a static variable to __init so it only does something on the first call |
Just wait for Titan to show up. Its 1 comparison more on each eval FFS. | Was that supposed to be a funny oxymoron??
Why do people such as yourselves format user names in bold text? If you have some knowledge of basic grammar and know how to structure a sentence properly there should be no reason to highlight nouns beyond their lexical and subjunctive meaning. It's also painfully annoying to read through mixed format text among emotive images which sadly a few on these forums are accustomed to. Thankfully we at least have AdBlock Plus which allows us to filter out those ridiculous animated signatures (if you frequent any gamer forum you'll know too damn well what I'm talking about).
| Joy2DWorld wrote: | | hiding code in a zip or rar... not make it easy to find later, (based on code), or to look at quickly... | Differentiating code for search crawlers is a good thing. It prevents scripts from being mistaken as descriptive text, thus allowing a refined quality of search results. I have considered serving a different non-indexable MIME type for .ahk files on autohotkey.net since hardly anyone provides relevant human-readable instructions or supplementary links with them, but I like to give users benefit of the doubt. _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3652 Location: Belgrade
|
Posted: Mon Dec 10, 2007 6:15 pm Post subject: |
|
|
| Quote: | | Was that supposed to be a funny oxymoron?? |
No
But you can concentrate on the "funny" part.
| Quote: | | If you have some knowledge of basic grammar and know how to structure a sentence properly there should be no reason to highlight nouns beyond their lexical and subjunctive meaning. |
I do know how to speak your language, at least so you can understand some of my words (talking about syntax ofc ) and to replay, obviously.
On the other hand you know sht about mine language.
| Quote: | | It's also painfully annoying to read through mixed format text among emotive images | You don't have to read acctually. When you see such text, just scroll till the end. Eventualy, you can disable images in your FF, or you can AdBlock my monkey as its eye blinks are especialy anoying  _________________
 |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Mon Dec 10, 2007 7:07 pm Post subject: |
|
|
| majkinetor wrote: | | On the other hand you know sht about mine language. | Actually I do; previet... kak dela... Win32.Sasser xD
| majkinetor wrote: | | you can disable images in your FF | If only it didn't have to stop there
Back on topic now, how did you find these addresses Lexikos? I only used Olly Debug once and it seemed too confusing for someone who doesn't know assembly x_X _________________
 |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2739 Location: Australia, Qld
|
Posted: Tue Dec 11, 2007 12:04 am Post subject: |
|
|
| majkinetor wrote: | | lex wrote: | | I have added a static variable to __init so it only does something on the first call |
Just wait for Titan to show up. Its 1 comparison more on each eval FFS. | I used a pre-existing comparison so __init is only called once. I guess you aren't referring to __expr.
| Laszlo wrote: | | Moderator: could you split this thread into two | Thanks for suggesting that. | Moderator! wrote: | | sure, awaiting a "go-ahead" from lexikos. | Please, go ahead.
| Joy2DWorld wrote: | | mere suggest that dynamic code is after all, subset of eval. | I think it is the other way around. Generating dynamic code does not automatically "evaluate" it, but to evaluate an expression, you must generate dynamic code...
| Titan wrote: | | Back on topic now, how did you find these addresses Lexikos? | I guess you mean the addresses of AutoHotkey's internal structures.
RegisterCallback returns an RCCallbackFunc structure, which among other things, contains a pointer to a user-defined function. From there, mJumpToLine points to the first line of the function, and mPrevLine/mNextLine allow any structures referenced "in script" to be accessed. (This includes Line, ArgStruct, DerefType, Var, Func, Label and maybe one or two others.) The script accesses only fields of structures defined in the AutoHotkey source code.
Reminds me of my UnrealScript days.  |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Tue Dec 11, 2007 12:34 am Post subject: |
|
|
| Joy2DWorld wrote: | | even an older version actually IN THE FORUM, allows (1) SEARCHING for things in the code, and (2) Getting to see the code INSTANTLY as you look over the forum. |
There is one thing I don't like about codebox: it doesn't retain TAB, converts to some spaces, even to 3, which should have been 8 in total in my case. So, all my format has been lost and the codes appeared not aligned.
| majkinetor wrote: | | I hope Sean will follow instead leaving all that COM things uncommented. No wonder why 0 ppl != Sean wrote COM server. |
That has been planned all the time. But I always became lazy on that part. Maybe because I never felt the need of it myself. I don't usually read the comments even when reading other members' scripts.
But, I did my best, in my own way of course. For example, the two COM servers were actually combined into one in my script. As it might appear unnecessarily complicated, however, I separated them when uploading, which was an extra work for me. Anyway, it may be now a matter of simply adding user functions into IDispatch COM server. |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3652 Location: Belgrade
|
Posted: Tue Dec 11, 2007 8:45 am Post subject: |
|
|
| Quote: | | There is one thing I don't like about codebox: it doesn't retain TAB, converts to some spaces, even to 3, which should have been 8 in total in my case. So, all my format has been lost and the codes appeared not aligned. |
Before posting, select all text of the script and do in your editor something like "convert tabs to spaces".
Then format will stay ok. _________________
 |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Tue Dec 11, 2007 10:23 am Post subject: |
|
|
| Sean wrote: | | There is one thing I don't like about codebox: it doesn't retain TAB | In your browser set the cookie codeblock-tab to 1, you can do this by typing javascript:void(document.cookie='codeblock-tab=1'); into your browser address bar. I wanted to make this the default but Chris asked me not to.
Test with the following:
| Code: | normal line
if (true)
do something
else
...
three tabs
two spaces
|
If you're using Opera you may see extra line feeds but that's due to its poor Javascript implementation which I cannot fix (whilst maintaining IE compatibility), without extensive hacking. IE7 and FF2 produce the desired effects however, so I suggest you use either of those browsers instead if you don't already. _________________
 |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1397
|
Posted: Tue Dec 11, 2007 11:39 am Post subject: |
|
|
| Titan wrote: | | you can do this by typing javascript:void(document.cookie='codeblock-tab=1'); into your browser address bar. I wanted to make this the default but Chris asked me not to. |
Yes that did the trick. Thanks. May I ask why Chris didn't like it? Looks like I have to do it every time I newly start Firefox. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Dec 11, 2007 12:38 pm Post subject: |
|
|
| Titan wrote: | | In your browser set the cookie codeblock-tab to 1... |
...I would like to mention, that not even in the thread about codeblock is this cookie mentioned...I know you've replied to one of my posts & mentioned it, but this cookie was never really "officially" introduced...
Search for: codeblock-tab
Display results as: Posts
Return first: All available :characters of posts ...(boy I wish I could link directly to results {but the GET params don't seem to work})...the 1st mention is a small comment in a bug report...
| Sean wrote: | | Looks like I have to do it every time I newly start Firefox. |
...no, just set expires on the cookie...
| Code: | Clipboard=
(LTrim Join
javascript:e=';expires=1-19-19 7:19:19pm EST';
document.cookie='codeblock-style=color:8080c0'+e;
document.cookie='codeblock-tab=1'+e;
void(0)
) |
...that is JavaScript wrapped in AutoHotkey, so I can not cause horiz scrolling, if you use my AHK Script Runner (which needs updated) you can select the text, run it as AutoHotkey, then the clipboard contains the correct JavaScript. I suggest adding a bookmark with that code & the keyword ahkcb...then anytime you need to fix it (if the cookies get cleared), type the keyword ahkcb in the location bar. Titan...I suggest you put that in the official code block topic & bump it...then poeple can know about all the "hidden cookies"...they can use...I'd also suggest those values I posted become default, but that will never happen...
Also what codeblock really needs is a helper php script...like getposttext.php...that would get the raw (including tabs or 3 spaces) text from the db, then codeblock wouldn't need to fish thru the html & manually replace "3 spaces with a tab"...cuz the replaces any 3 spaces, even those that were originally 3 spaces, not a tab... |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|