AutoHotkey Community

It is currently May 27th, 2012, 10:33 am

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: February 28th, 2005, 6:58 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Here are the changes for v1.0.29:

Fixed things like "Sleep %Seconds%000", which stopped working in v1.0.25+. [thanks Mayhem]

Fixed the Input command to correctly capture uppercase and control characters when not in "visible" mode.

Fixed key-up hotkeys to work on the neutral keys Control, Shift, and Alt. [thanks jonny]

Changed compiled scripts to always have their .exe file extension at the end of their names for the purpose of A_ScriptFullPath and default window titles. This also allows #SingleInstance to work even when the script is launched from the command line without its extension. [thanks Mythos]

Improved ClipWait to optionally wait for any data rather than just text and files.

An expression can be used in a parameter that does not directly support it by preceding it with a percent sign and a space or tab. This is most commonly used to access arrays [thanks JSLover]. Examples:
FileAppend, % MyArray%i%, My File.txt
MsgBox % "The variable MyVar contains " MyVar "."
Control, Choose, % CurrentSelection - 1

Added built-in variable A_MSec, which is the current time's millisecond. [thanks JSLover]

Added built-in variable ClipboardAll, which contains all data on the clipboard (such as pictures and formatting). This can be used to save and restore the clipboard to memory or a file as in these examples:
ClipSaved = %ClipboardAll%
Clipboard = %ClipSaved% ; Done at a later time to restore the original contents.
FileAppend, %ClipboardAll%, C:\Saved clipboard.bin ; Write the entire clipboard to a file.
FileRead, Clipboard, *c C:\Saved clipboard.bin ; Restore from a file via the *c option.

http://www.autohotkey.com/download/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 28th, 2005, 8:36 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
ClipboardAll is great addition!
is it now somehow possible to take screenshots with ahk? ... like sending {PRINTSCREEN} and saving CipboardAll as bmp or something?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 28th, 2005, 10:05 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
No, but you could save a bunch of clipboards and then later have a script go through them all convert them as BMP (by loading them on the clipboard, pasting them into an image program, and then saving).

Since clipboard files with saved images in them are usually raw DIB files with a few bytes extra at the beginning and end of the file, it might be possible to convert them directly somehow (with a utility or custom program). Unfortunately, converting a BMP on the clipboard into a BMP file on disk requires several steps and I haven't found a definitive answer on the best way to do it (someone knowledgeable could have a draft of it done in about 10 minutes).

Anyway, it is still planned to support BMP<->clipboard manipulation in a future version.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 9:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
Chris wrote:
Anyway, it is still planned to support BMP<->clipboard manipulation in a future version.

...not to throw more on your plate, but how about PNG in addition to BMP? I use ScreenShotAssistant (sourceforge.net) (website {supposedly} coming soon, till then use the sourceforge project page) for my screen shots. I can't find info on it, but it says it uses JansGraphics.dll (from jansfreeware.com), which creates great, small pngs, smaller than what MS Paint puts out everytime (when pasting the clipboard & saving as png)...since everything involved is freeware (& at least SSA is open source {I don't know about the dll}), you might be able to scrape it into AHK. Aha! Google works wonders...I searched for "JansGraphics.dll" & it asked me if I meant "JanGraphics.dll", clicking that, led me to...Jans Freeware COM Objects...evidently the author of SSA made a typo in the About box (adding an s to the filename {but really, it sounds better with the s}). Searching my computer (for the corrected name) found it in C:\Windows\system32\janGraphics.dll. I wrote a helper script for SSA, which I'm gonna post in the Scripts forum later.

I've been meaning to ask you...why were there 14 sub-versions of 1.0.25 but only 1 each for 1.0.26, 1.0.27 & 1.0.28? What constitutes a "big" version change over a "small"?

Thanks for 1.0.29...I'm gonna install it soon...but have you decided on changing the help file background color to white? Currently I have de-compiled the help file & re-compiled with my changes, but I don't wanna have to do it for every version (but my version also restores the blue bars along with the background color).

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 1:06 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
JSLover wrote:
...not to throw more on your plate, but how about PNG in addition to BMP?
As far as I know, you can't put PNG files directly only the clipboard, at least not in a neutral format understood by any application. Instead, PNGs are first converted to BMP or DIB and then put on the clipboard.

If you use a particular application that is able to copy & paste PNG images within its own windows, that can be automated by saving a clipboard using FileAppend, ClipboardAll, PNG Ready To Paste.clip and then loading it again later with FileRead, Clipboard, *c PNG Ready To Paste.clip

Quote:
since everything involved is freeware (& at least SSA is open source {I don't know about the dll}), you might be able to scrape it into AHK.
Since AutoHotkey is designed to be tightly integrated (not requiring any registry entries nor any DLLs), I don't think this would be worth it unless there was some huge benefit.

Quote:
I've been meaning to ask you...why were there 14 sub-versions of 1.0.25 but only 1 each for 1.0.26, 1.0.27 & 1.0.28? What constitutes a "big" version change over a "small"?
Releases that lack any major new features tend to be minor releases.

Quote:
have you decided on changing the help file background color to white?
I don't see a significant benefit to forcing white, and keeping it the way it is allows anyone to select a custom background color. For example, if you visit http://www.yahoo.com with MSIE, your custom background color should be in effect there too. Contrary opinions are welcome.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 2:05 pm 
Offline

Joined: February 17th, 2005, 10:06 am
Posts: 280
Location: Hungary, Budapest
Chris wrote:
Since clipboard files with saved images in them are usually raw DIB files with a few bytes extra at the beginning and end of the file, it might be possible to convert them directly somehow (with a utility or custom program). Unfortunately, converting a BMP on the clipboard into a BMP file on disk requires several steps and I haven't found a definitive answer on the best way to do it (someone knowledgeable could have a draft of it done in about 10 minutes).
You can find ideas in CLCL-s source code, it converts clipboard data rendered as CF_BITMAP on the fly in its viewer.

_________________
Is there another word for synonym?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 3:47 pm 
I guess, ClipboardAll includes the option to push the clipboards content directly to StdOut means a DOS Box. Am I correct here ?


Top
  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 4:43 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Code:
FileAppend,%clipboardall%,*
return


Only works if you pipe it to pipesplit or mtee, though, like so:

C:\AutoHotkey\AutoHotkey.exe C:\Test.ahk | pipesplit.exe nul


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 6:37 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
@Chris

Thanks for the new version.
But before I start testing, I already have a question.

Imagine you have a list of items and each item has properties
And you seach for a certain property in that list of items.
What I currently do is:
Code:
SplitString,Array,ListOfItems, `,
;eliminate spaces
Property := Array4
If (Property = "abc")
      MsgBox, Found

Because this doesn't work:
Code:
SplitString,Array,ListOfItems, `,
If (Array4 = "abc")
  MsgBox, Found
It doens't work, because Array4 may have trailing spaces. And therefore doesn't contain "abc" but "abc ".

The same I do in loops:
Code:
SplitString,Array,ListOfItems, `,
Loop, %Array0%
  {
    ;eliminate spaces
    Property := Array%A_Index%
    If (Property = "abc")
      {
         MsgBox, Found
         break
      }
  }


Would this work now:
Code:
SplitString,Array,ListOfItems, `,
Loop, %Array0%
  {
    ;does the "%" eliminate spaces ?????????
    If ( % Array%A_Index% = "abc")
      {
         MsgBox, Found
         break
      }
  }
Would the % eliminate the spaces (like with AutoTrim)?

_________________
Ciao
toralf
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2005, 11:48 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
SanskritFritz wrote:
You can find ideas in CLCL-s source code, it converts clipboard data rendered as CF_BITMAP on the fly in its viewer.
Thanks, that should help.

BoBo wrote:
I guess, ClipboardAll includes the option to push the clipboards content directly to StdOut means a DOS Box.
No, that isn't currently supported because I hadn't thought of it. I'm not even sure if it would work since I don't know for sure if cmd.exe is capable of piping binary data without corrupting it (I've never piped or redirected anything other than plain text).

toralf wrote:
Property := Array%A_Index%
The above won't trim spaces because the := operator does not obey AutoTrim. I think the only way to get AutoTrim into effect for something like this is:
Property := Array%A_Index%
Property = %Property%

Someday, there should be an easier way such as:
If (Trim(Array%A_Index%) = "abc")


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2005, 9:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
Chris wrote:
As far as I know, you can't put PNG files directly only the clipboard, at least not in a neutral format understood by any application.

...I guess I might've quoted the wrong part of your post, I wasn't meaning to put a png on the clipboard (I don't care what format it is on the clipboard), but you mentioned bmp->disk...

Chris wrote:
(by loading them on the clipboard, pasting them into an image program, and then saving).

...

Unfortunately, converting a BMP on the clipboard into a BMP file on disk

...so I was really on the bmp->disk track & not on the bmp->clipboard track...so what I meant was, if you get bmp->disk support, can you also support png->disk?...or really that means CB->disk as bmp & CB->disk as png.

Chris wrote:
If you use a particular application that is able to copy & paste PNG images within its own windows

...no, SSA watches the clipboard for images (normally put there by pressing Print Screen) & writes them to disk using settings you gave it beforehand (what dir, what filename prefix, what format).

Chris wrote:
Since AutoHotkey is designed to be tightly integrated (not requiring any registry entries nor any DLLs), I don't think this would be worth it unless there was some huge benefit.

...can't you support a command that links into a dll, but if the person don't have the dll, that command just don't work? It won't need to require the dll (for all scripts), it can just ignore that command (or give an error) if someone tries to use it without having the dll. The only other option is to write your own image routines, which would increase the size of all scripts & perhaps not have as good of file sizes (on png's). I think certain commands using external dlls, isn't a bad thing...cuz (it don't increase every .exe's file size &) you can put in the help file "use of this command requires this dll on the target computer". I'm sure other AHKers are on track with the no-dll thing, but as long as the dll is only required *if* a script *uses* that command, I think it's ok. Poll anyone?: Should a few ahk commands be allowed to link into external dlls?...almost the same as using an external .exe (BoBo), but this image writing thing is a dll & not an exe, so I can't use it that way.

Chris wrote:
I don't see a significant benefit to forcing white

...would it be too much to ask you to compile a 2nd help file with white?...read on before you say "Yes (it would it be too much to ask)". You could (write an ahk script to), compile normally, rename "default.css" to "default-hold.css", rename "default-white.css" to "default.css", recompile & then rename both back, this way you only rename a file & recompile & don't need to re-configure the help compiler (to use one css the 1st time & another the 2nd time) (unless having 2 help projects is easier than renaming???). If not that, could you provide your .hpj? Cuz when I de-compiled it before that was the one file it didn't give me & I had to guess at until I got it configured like you have it (with the buttons & help window names).

Chris wrote:
and keeping it the way it is allows anyone to select a custom background color.

...it doesn't let me choose an AHK background color, it makes me change my browser default to accommodate one page. This don't help the compiled help file, but on the web, you can provide an "alternate style" & I can pick it in the browser, cuz the online help still looks like crap & I can't fix that. Actually, I'm not sure how persistent "alternate style"s are, if I need to re-pick the alternate style on every visit or if the browser remembers it, if you test that & it's not persistent, would you mind if I code some cookies to remember a user bgcolor (that you put on the help pages)?

Chris wrote:
For example, if you visit http://www.yahoo.com with MSIE, your custom background color should be in effect there too. Contrary opinions are welcome.

...yes, alot of sites have not specified a background color (& look like crap), but I don't think most of them do it to "use your custom background color" I think they do it, cuz in their IE, when they test it, white is default, so they think everyone else's is white too & don't even think about setting it.

...this board specifies colors for everything...& looks good...

Why is the new variable called ClipboardAll & not ClipboardRaw (All what?)? Why do most operations have to be on a "saved" version of it & not directly on ClipboardAll?

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2005, 11:00 am 
Offline

Joined: November 22nd, 2004, 11:37 am
Posts: 27
While it is very nice to have a language developer that is responsive to the perceived needs and suggestions of the users, his primary job is to provide us with a good, solid, usable language that meets the needs of the majority of the application developers using it. Our job as programmers is to take the commands and functions provided and make them do the job we need to do. I have found that Chris and AutoHotKey fulfill this requirement in an exemplary fashion. Sometimes as programmers we get a little impatient with the progress of our favorite language. From what I can see, this one is progressing very nicely. Many new things are in process and any bugs or glitches are addressed in a very timely fashion. Hang in there and I am sure that the issues you have addressed will come to pass as we and the language grow together.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2005, 5:22 pm 
Quote:
Why is the new variable called ClipboardAll & not ClipboardRaw ?
Cause Chris is entitled to do it.

Btw. have your parents asked you if you're fine with your name (right in the moment they gave it to you) ?
If yes, what was your answer ?
Guess something like: "buaaahhh-gnanggnga-bblblbbl-burbs" :wink:
So what ? 8)


Top
  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2005, 5:53 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Either All or Raw is fine with me. I think it's young enough to still be open to change. Raw seems to be the one preferred by the AutoIt3 community for such variables/arrays, so I guess that's the one I'd lean towards. Anyone whose script it would break has to be keeping up with the development or they wouldn't have put it in by now, so I think it's safe to change.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 3rd, 2005, 12:34 am 
BoBo wrote:
Quote:
Why is the new variable called ClipboardAll & not ClipboardRaw ?
Cause Chris is entitled to do it.

Btw. have your parents asked you if you're fine with your name (right in the moment they gave it to you) ?
If yes, what was your answer ?
Guess something like: "buaaahhh-gnanggnga-bblblbbl-burbs" :wink:
So what ? 8)


My parents called me "the boy" until I was nine. Then they called me Bob O. I just accepted it... :(

Yes, it's a sad story...


Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 37 posts ]  Go to page 1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher and 1 guest


You cannot 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