topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 7:34 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: On Screen Button That Sends Keyboard Commands  (Read 167463 times)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #125 on: June 19, 2011, 11:42 AM »
They are both there
-Ath
It's a bit hidden, sorry for any confusion:
Screenshot - 19-06-2011 , 18_36_43.pngDONE: On Screen Button That Sends Keyboard Commands
My original goal was to have it automagically attach the correct extension, but the standard Save As... dialog doesn't seem to do that :(
If a filename is typed without an extension, the .wbuc extension is automatically added.

And apologies for the Dutch screen, I only have a Dutch XP virtual available. :-[

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: (Update) GUI Editor for WinButtons: WinButtonEdit 0.9.1 (RC7)
« Reply #126 on: June 19, 2011, 01:24 PM »
A few bugfixes to WinButtonEdit validate an updated release:

WinButtonEdit 0.9.1.0 (RC7)
Change history since 0.9.0.0:
Code: AutoIt [Select]
  1. ; 2011-06-19, v0.9.1.0 (RC7)
  2. ; * Changed File/New to do nothing if Cancel was clicked on the Save File dialog
  3. ; * Improved File Selection (Open/Save) dialogs to include *.wbuc + *.ini and *.* selections and each choice separate (ewemoa/cranioscopical)
  4. ; * Improved File/New and File/Save as to add the filename to the MRU list
  5. ; ! Fixed Drag&Drop ignored .ini files because of a wrongly placed round brace :( (ewemoa)
  6. ; ! Fixed Save routine for a typo (confitionmode/conditionmode), and it now deletes any removed/obsolete buttons and groupnames during save

Download as usual included with WinButtons, and available from the original release post

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Some more minor changes and code optimizations, so another release of:

WinButtonEdit 0.9.1.1 (RC8)
Change history since 0.9.1.0:
Code: AutoIt [Select]
  1. ; 2011-06-20, v0.9.1.1 (RC8)
  2. ; + Added 'Edit with WinButtonEdit' to 'Set file association for .wbuc' menu
  3. ; * Changed Associate with WinBut... to Open with Winbut... in 'Set file association for .wbuc' menu
  4. ; * Changed to set 'Open with WinButtonEdit'/'Edit with WinButtonEdit'/'Open with WinButtons' for Explorer context menu instead of the default 'Open' or 'Edit'
  5. ; * Improved some minor stuff in code, added some more #regions

Download as usual included with WinButtons, and available from the original release post

This should be the last RC assuming ewemoa or cranioscopical won't find any breaking issues or just plain bugs 8), so please feel free to test WinButtons and WinButtonEdit and report any errors they didn't find, or point me at any mistakes I may have made :-\

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #128 on: June 20, 2011, 07:53 PM »
Thanks for the continual improvements.

Earlier, your tour de force had me trying to buy one of the iMo Monster 10-inch touch screens. At the time they were out of stock. Then I found a number of comments to the effect that they conflicted with the 'standard' video drivers that some users had. There seemed no way to tell except empirically, in one's own system. Given that there was a 15% (if I recall right) restocking fee, and that the thing had to be shipped from the U.S. to where I live, and the unspecified wait to fulfil orders, and slow response from the manufacturer to questions, that idea faded out. I'll take a look around next time I'm in the States. The last time I was there none of the computer/electronics stores had even heard of the thing.

I'll see if I can defer a final decision by breaking something else in WB ;)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #129 on: June 20, 2011, 08:19 PM »
Verified the following (in 0.9.1.1):

Changed File/New to do nothing if Cancel was clicked on the Save File dialog
Improved File Selection (Open/Save) dialogs to include *.wbuc + *.ini and *.* selections and each choice separate
Fixed Drag&Drop ignored .ini files
-Ath

Thanks!

BTW, when I choose File->New, I see a preview that shows a button labelled "Test button".  I don't suppose it's easy to have no button displayed, but still with some sort of blank preview...

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #130 on: June 21, 2011, 01:20 AM »
BTW, when I choose File->New, I see a preview that shows a button labelled "Test button".  I don't suppose it's easy to have no button displayed, but still with some sort of blank preview...
Yeah, at first I couldn't get it to behave with no buttons available, but I guess I should go for an empty (no buttons) window, instead of a non-functional button. I'll see what goes best.

I'll see if I can defer a final decision by breaking something else in WB ;)
-cranioscopical (June 20, 2011, 07:53 PM)
;D

Both of you, thanks for the heads up :up:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #131 on: June 26, 2011, 06:59 PM »
XP SP3 WB 3.3.0.0 WBE 0.9.1.1

Using image specified in .wbuc file with .ico file in same directory as WB and WBE exes, the image of the .ico is displayed in preview of WBE, but not when using .wbuc file from WB.

Code: Text [Select]
  1. [Settings]
  2. left=-1
  3. top=-1
  4. closebutton=1
  5. border=1
  6. taskbar=1
  7. vertical=1
  8. [Buttons]
  9. button1=New Button 1
  10. command1=-sub -?
  11. caption1=New Button 1
  12. image1=Video2MP3.ico

On a related note, noticed that image of .ico doesn't appear to get scaled appropriately.  Specific case was .ico extracted from Video2MP3.exe -- 128x128 button size shows whole image, but smaller sizes tried (e.g. 48x48) show a portion of the image.  Would be nice if scaling worked :)

Also, any chance of supporting specification of icon from .exe?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #132 on: June 27, 2011, 01:22 AM »
Using image specified in .wbuc file with .ico file in same directory as WB and WBE exes, the image of the .ico is displayed in preview of WBE, but not when using .wbuc file from WB.
Did you place the .ico file to the same directory as where the .wbuc file is?
128x128 button size shows whole image, but smaller sizes tried (e.g. 48x48) show a portion of the image.  Would be nice if scaling worked
I'll check that out
Also, any chance of supporting specification of icon from .exe?
Ah, a feature request :up:, I'll investigate.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #133 on: June 27, 2011, 01:59 AM »
Using image specified in .wbuc file with .ico file in same directory as WB and WBE exes, the image of the .ico is displayed in preview of WBE, but not when using .wbuc file from WB.
Did you place the .ico file to the same directory as where the .wbuc file is?
Sorry if this was unclear.  WB, WBE, the .wbuc file, and the .ico file all live in the same directory.  Is that clearer?

Good luck with your investigation regarding the scaling and thanks for considering the exe / icon feature request :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: WinButtons 3.3.1 and WinButtonEdit 0.9.2.3 (RC9)
« Reply #134 on: July 02, 2011, 02:11 PM »
I tried to solve a few issues reported by ewemoa, and also implemented his feature request:
  • Showing an icon in WBE preview but not when running WB: Undetermined, the same code is 'included' for both exe's. Was the .wbuc/.ini file saved?
  • Would be nice if scaling worked: Scaling is not directly supported for button-images, investigation continues
  • any chance of supporting specification of icon from .exe?: Implemented in this release :)

So today I bring to you WinButtons 3.3.1 and WinButtonEdit 0.9.2.3 (RC9)

The What's new for WinButtons can be found on the original release post

WinButtonEdit
Change history since the previous release (RC8):
Code: Text [Select]
  1. 2011-07-02, v0.9.2.3 (RC9)
  2.   + Added support for Environment and macro expansion when using images, so @SystemDir@\shell32.dll,-121
  3.   + Added automatic translation between directories available through @ macros when selecting an image file, examples: @WindowsDir@, @SystemDir@, etc.
  4. 2011-07-01, v0.9.2.2 (RC9) (not released)
  5.   * Improved Image selection dialog for .exe/.dll/.ocx/.icl support and updated relevant routines
  6.   + Added Icon selection dialog during Image selection, if .exe/.dll/.ocx/.icl file is opened
  7.   ! Changed all File selection dialogs to return to the original directory after use
  8.   ! Changed when selecting a button in the sample display, return focus to WBE
  9. 2011-06-30, v0.9.2.1 (RC9) (not released)
  10.   * Improved adding icons from exe and dll support, searching for larger display of icons
  11. 2011-06-27, v0.9.2.0 (RC9) (not released)
  12.   + Added support for icons from exe and dll files, and also support for an icon index into the file (requested by ewemoa)
  13.   * Changed Added *.exe and *.dll to image selection dialog

The download is as usual available from the original release post, WinButtonEdit.exe and readme is included in the zipfile with WinButtons.exe, that also has it's sourcecode and updated readme.

Feedback is, as always, welcome :up:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Release: WinButtons 3.3.1 and WinButtonEdit 0.9.2.3 (RC9)
« Reply #135 on: July 02, 2011, 06:56 PM »
Showing an icon in WBE preview but not when running WB: Undetermined, the same code is 'included' for both exe's. Was the .wbuc/.ini file saved?
I didn't reproduce the issue with the latest version -- I admit it's possible there was some pilot error originally :)

Would be nice if scaling worked: Scaling is not directly supported for button-images, investigation continues
-Ath
Thanks for your continued efforts, and good luck!

any chance of supporting specification of icon from .exe?: Implemented in this release :)
-Ath
I have good news and bad news...

The good news is that it seemed to work for the likes of shell32.dll.  Hurray :)

The bad news is that it didn't seem to work for Video2MP3.exe.  I was able to bring up the icon selection dialog for Video2MP3.exe, saw the desired icon, clicked on the select button, but didn't end up seeing the icon in the preview (just blank).  I clicked on the Apply button, saved, and restarted WBE, but no change.  Also tried WB but still saw a blank button.

Also tested by specifying via the file WinButtons.exe as a source of icons with similar unsuccessful results.

Sample .wbuc file content that appears to reproduce the issue is below.

Code: Text [Select]
  1. [Settings]
  2. left=-1
  3. top=-1
  4. closebutton=1
  5. border=1
  6. taskbar=1
  7. vertical=1
  8. [Buttons]
  9. button1=New Button 1
  10. command1=-sub -?
  11. caption1=New Button 1
  12. image1=WinButtons.exe,-1

In the image1= line, tried changing -1 to 1 and subsequently did see an icon, btw.

Using WBE's .exe as a source of icons, icons show up in the preview when specifying -4, -3, 0, 1 but not for -1.  The icons that shows up for 0 and 1 look similar, FWIW.

XP SP3 WB 3.3.1.2 WBE 0.9.2.3

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #136 on: July 03, 2011, 04:31 AM »
In the image1= line, tried changing -1 to 1 and subsequently did see an icon, btw.

Using WBE's .exe as a source of icons, icons show up in the preview when specifying -4, -3, 0, 1 but not for -1.  The icons that shows up for 0 and 1 look similar, FWIW.

It was indeed quite some black magic to me. That's one of the reasons it took a few days, had a lot of issues with the positive and negative indexes. AFAICS, that's some sort of 'feature' of the linker that puts the icons into the exe, I don't know how it can be influenced. (don't have much experience in this field). Probably creating a .rc file with the correct indexes, and resource-compiling that is the way to go for compilers supporting that... AutoIt doesn't, AFAICS.

During the selection of the Icon, there's a button to the right/top of the dialog to switch 'by Name'/'by Ordinal'. Does switching that help?
Most of the time, index 0 displays the default icon of an exe, so if you omit the index WB applies 0 by default.

The bad news is that it didn't seem to work for Video2MP3.exe.
Can you point me where to get that, or PM me the file zipped so I can test/check that exe myself? TIA

Oh, and the -2 icon in WBE.exe is a blanc image, FWIW, it shows up in the icon browser, and using WinButtonEdit.ico (not supplied with the download) reveals a much larger view with index -7 (icon attached here, index needs to be typed manually), I couldn't get the larger icons of WinButtons.ico in view though.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #137 on: July 03, 2011, 05:38 AM »
During the selection of the Icon, there's a button to the right/top of the dialog to switch 'by Name'/'by Ordinal'. Does switching that help?
Yes!  This seems much better -- worked with Video2MP3.exe and WinButtons.exe.  Perhaps 'by Ordinal' isn't a bad default :)

Most of the time, index 0 displays the default icon of an exe, so if you omit the index WB applies 0 by default.
-Ath
Thanks for the info.

Regarding Video2MP3, I get it via:

  http://skwire.dcmembers.com/wb/pages/software/video-2-mp3.php

FWIW, when I use NirSoft's IconExtract, I see 5 sizes for the icon extractable from Video2MP3.exe (16x16, 32x32, 48x48, 64x64, and 128x128).  In WBE / WB I end up seeing one of the smaller ones displayed as near as I can tell.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #138 on: July 03, 2011, 01:40 PM »
FWIW, when I use NirSoft's IconExtract, I see 5 sizes for the icon extractable from Video2MP3.exe (16x16, 32x32, 48x48, 64x64, and 128x128).  In WBE / WB I end up seeing one of the smaller ones displayed as near as I can tell.
I can see them too (thanks for the link :up:), but I've been unable to select a specific icon-image from an icon embedded in an exe without extracting it from the file. Guess the best solution is give instructions how to link to NirSoft's IconsExtract, extract the icon using it, and address the desired icon from the .ico file using the index displayed by IconsExtract (while the .ico is still in the exe) (sorry if this sounds a bit cryptic :-[)

As said earlier, AutoIt hasn't provided me with a clue (yet) on how to specify the order/index of the icon-images included, and I probably need to add all icons as separate ico files (if that is even possible) to be able to address them individually.
But most exe's have combined icons and use the embedded resource traversing routines to display the desired icon size.
Haven't decided how to proceed from here.

In the meantime I've been able to add (optional) scaling to normal .bmp images, so it sizes to the button width and height, I'll release that probably tomorrow-night. (today I'm a bit short on time).


ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #140 on: July 04, 2011, 05:42 AM »
BTW, I'm not quite sure what the conditions are that reproduce the issue, but it happens that under some circumstances, there is a fair bit of blank space to the right of the buttons:

blank-area-on-right-when-32-by-32.pngDONE: On Screen Button That Sends Keyboard Commands

May be it also depends on the icons referenced, but the button width and height may be related:

Code: Text [Select]
  1. buttonwidth=32
  2. buttonheight=32
« Last Edit: July 04, 2011, 05:44 AM by ewemoa »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #141 on: July 04, 2011, 06:26 AM »
That's because you have 'Vertical Display' checked. :)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #142 on: July 04, 2011, 06:48 AM »
Hmm...Perhaps there's something in the docs somewhere about this.  Any pointers?  I didn't turn up anything.

FWIW, when I uncheck "Vertical display", though there is less, there is still space to the right of the right-most icon.  May be this is also expected too...

Confused.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #143 on: July 04, 2011, 02:57 PM »
The combination of 'Show Window Border' and 'Show in Taskbar' is kinda 'the culprit', as it then shows a full-size Close button and a System menu.

If you could either turn off 'Show in Taskbar', or turn off 'Show Window Border' and turn on 'Allow Window movable', you can still move the WinButtons Window around, and have the Window fit rather snugly around the buttons. Just a bit of experimenting involved ;)
I must say I slightly prefer the 'Show Window Border' version, over then the w/o border version. With 32x32px buttons the Window is quite small, and hard to hit, even with a mouse.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #144 on: July 04, 2011, 05:00 PM »
The combination of 'Show Window Border' and 'Show in Taskbar' is kinda 'the culprit', as it then shows a full-size Close button and a System menu.
Ah, I have tried various options and see.  Thanks for the explanation.

Turning off "Show in Taskbar" seems like a doable work-around in this case.

Thanks.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: WinButtons 3.3.2 and WinButtonEdit 0.9.3.0 (RC10)
« Reply #145 on: July 04, 2011, 05:01 PM »
Tried to work around the .ico issues/wishes reported by ewemoa, but because of the load of work involved that's already done by NirSoft's IconsExtract, I settled for a reference to that utility in the readme ;)

While going in that direction, I was able to add an optional scaling feature for the display of .bmp images on a button, it can resize to the actual button size if the image path/filename is prefixed with a dash (like '-flower.bmp', no quotes).

This isn't a big release but the versions got to go up, so here we go:

WinButtons 3.3.2 and WinButtonEdit 0.9.3.0 (RC10) are now available from the original release post.

The only extra is the WinButtonEdit.ico added to the zip-file, for those that might like it :tellme:

Bugreports and/or feature requests still welcome :up:

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #146 on: July 04, 2011, 07:18 PM »
WinButtons 3.3.2 and WinButtonEdit 0.9.3.0 (RC10) are now available from the original release post.
I see version 3.3.1.2 via the Version tab of WinButtons.exe Properties.  FWIW, I do see the included WinButtonEdit.ico.

Perhaps I got the wrong zip file?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #147 on: July 05, 2011, 01:29 AM »
I see version 3.3.1.2 via the Version tab of WinButtons.exe Properties.

Ah, I see what happened, after updating the version info I didn't hit the compile button :-[, but the new feature(s) should be there, as it was compiled just before that.
I won't be able to update before I get home though, I'll bump the version to 3.3.2.1 then.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #148 on: July 05, 2011, 02:03 AM »
Thanks for the clarification :)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #149 on: July 05, 2011, 01:27 PM »
I bumped the version info by this time actually compiling after updating the version number in the source :-[, and updated the download on the original release post.
Nothing else was changed.