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, 4:25 pm
  • 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 167488 times)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #175 on: September 11, 2011, 12:48 PM »
Marvellous.

One main feature I've been meaning to request is a button "state" toggle, i.e. when you hit a button it then changes appearance, which means it could change background and/or text colour OR the button image file.

As an example: I use the buttons to toggle "modes" or program states in Photoshop like "snap to grid", but I can quickly forget whether I've enabled that mode or not - so a visual cue of the related button being red, for enabled, and black for disabled would be very useful.

Maybe this kind of feature would lead to more confusion, though, as the button wouldn't reflect any program (Photoshop) state changes that were performed via menu commands or keyboard shortcuts.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #176 on: September 11, 2011, 01:19 PM »
Maybe this kind of feature would lead to more confusion, though, as the button wouldn't reflect any program (Photoshop) state changes that were performed via menu commands or keyboard shortcuts.
I think this is the biggest disadvantage of a button/function like that. What if you changed it from the application menu, or using a keyboard shortcut? The state wouldn't be in sync with what WinButtons is displaying to you. Unless ofcourse there's a way to retrieve the setting from somewhere :-\ And if those states could be explicitly set, but lots of times it's a toggle, and not one menu-item for On and another for Off.

In fact, a toggle-button is currently possible, by defining 2 adjacent buttons with conditionmode set to 0 (or conditionmode 2 and arrangement 2) and having a reverse condition state. I've done so in the copymenu.ini example layout (it's an early version of a layout that is in actual use). But it requires the state to be measurable, as is a directory or file that exists or not, or set to a :varVariable:.
Hm, I have 2 more items for my todo list ;)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: On Screen Button That Sends Keyboard Commands: WinButtons 3.4.2.3
« Reply #177 on: September 13, 2011, 03:45 PM »
I've been doing some more testing, mostly of WinButtonEdit as it had a few annoyances. Most of that is fixed now (what's not fixed, I didn't see or find ;)) And not unimportant, I added the missing .dcupdate files, for dcuhelper :-[
Details are in the WinButtonEdit.readme.txt file, and WinButtons.au3 source.

I received a template from nudone, to be used with the touch-screen, and I modified and expanded it with some numkeypad samples (also in the zipfile).
Screenshots are in the release message.

Here's an update release of:
and

Download available from the release message, linking to my DCMembers pages.

Any feedback is still welcome, as usual :)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #178 on: September 20, 2011, 07:05 AM »
Ath, is it possible to change the colour of the button borders?

Maybe just as a global thing or, if possible, global AND individual buttons.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #179 on: September 20, 2011, 08:01 AM »
Are you talking about an extra border around/behind each button with a specific color, different from the background color, or about a part of the current button?

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #180 on: September 20, 2011, 08:10 AM »
When using the default buttons (without any icons or bitmaps) I have a thin, 1 pixel width, blue border around each button. They are always blue.

I just wondered if it was possible to change the blue to another colour, preferably from within WinButtonsEdit. Doing it globally for all buttons would be good but it would nicer if individual buttons could have this blue border changed too.

In other words, currently, the default WinButton button border colour appears to be blue. I'd like to make it red. And then have a few specific buttons with their own individual border colour, i.e. not the global default colour.

So, I'm not referring to the overall background colour, just each individual button's border.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #181 on: September 20, 2011, 10:28 AM »
AFAIK that's the Windows selected/hovered-button-color, not sure how to change that :huh: I'll look into it.

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #182 on: September 20, 2011, 10:47 AM »
Oh right. Just thought it would be something to do with autoit. If it's not possible/simple then I'll just create a series of buttons that use graphic files instead.

Changing the background colour is a bit too much really, the 1px width border lines are minimal enough to be noticeable without being too distracting.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #183 on: September 20, 2011, 12:16 PM »
I couldn't check during my earlier messages, but now I see what you mean, it's the dark-blue borders that are the actual _borders_ of the button surroundings. Hm, I kinda like the thin hair-lines between the buttons, probably because of my fat fingers :P, makes it easier to aim at the right function.

I've been playing a bit with the colors, and by selecting blue text color (0x0000FF) it looks rather Ok to me:

Screenshot - 20-09-2011 , 19_16_06.png

Still, let me see what closer to your taste solution I can come up with ;)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #184 on: September 20, 2011, 12:37 PM »
Normally, I wouldn't have thought much about it, but I've a MS Sidewinder keyboard and this has illuminated keys - red being the only choice (though there are orange ones on the macro keys).

So, as the MIMO is placed at the top of the keyboard, it would be nice to have a similar "red" theme for the buttons. It's a minor thing but I think will just make the desk look a bit nicer.

Here's what I meant (though, I think you understand now by the sounds of it).

all-red.png
All red borders.

two-color.png
Mainly red borders with a single button different.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #185 on: September 20, 2011, 04:41 PM »
Well, compared to my previous screenshot, I've come to this:

Screenshot - 20-09-2011 , 23_37_37.png

But it has no button-borders at all (unless I set a background color different from the buttoncolor), so that's what I'll be working on :)
The buttons do work, but I still have some issues with images :(

Colors do work:
Screenshot - 20-09-2011 , 23_42_12.png    and when pressed:    Screenshot - 20-09-2011 , 23_44_29.png
« Last Edit: September 20, 2011, 04:43 PM by Ath, Reason: pressed image added »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #186 on: September 20, 2011, 04:53 PM »
That's starting to look like the Windows 8 desktop (which I like in aesthetic terms), that could be a good bandwagon to jump on.

If you are working on a new way for adding images to buttons, I'd like to add another request: is it possible to add a small image to a button so that it appears above the buttons text/name/label?

Just thinking it could help to identify buttons with image and text, though, I appreciate an image could be made that includes the text anyway. No problem for me, just thinking of others that might not be able to create perfect image based buttons.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #187 on: September 20, 2011, 05:07 PM »
If you are working on a new way for adding images to buttons, I'd like to add another request: is it possible to add a small image to a button so that it appears above the buttons text/name/label?
That's one of the parts of the stuff that doesn't (and didn't before) work :( A limitation of the standard Button control, AFAIK.

I've been busy the last couple of days, rewriting the whole shebang in Delphi (7) (spare-time only), but that's hardly showing anything yet (doing it in OO but I didn't write/draw anything on paper before I started coding :-[).
It will probably be easier to solve all the graphics related stuff/issues with Delphi, but I'd like to have it working for 'most of the fancy stuff' in this AutoIt version also. The re-write is going to take some time, as my Delpians is a bit rusty :huh:, but google has been patient with me ;)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #188 on: September 20, 2011, 05:11 PM »
Sounds good, something to look forward to.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #189 on: September 21, 2011, 05:16 PM »
I've been hacking away on the AutoIt version, and I'm slowly getting somewhere:

  • Colors
  • Images (bmp, gif, jpg/jpeg)
  • images combined with (bottom) labels work
(these last 2 features only on border-less buttons):

Screenshot - 22-09-2011 , 00_10_01.png           and when pressed (x4y3):        Screenshot - 22-09-2011 , 00_11_43.png

Still got a lot of testing to do, maybe I can make a release during the weekend :)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #190 on: September 21, 2011, 05:47 PM »
Good work. As you are making great progress I'll stick another request in, though I think this may be too much (because of what you've said before),:

As you've managed to get jpg to work, could you get png to work too - and if so, could that be png with alpha transparency so the harsh edges can be avoided (that gif produces).

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #191 on: September 24, 2011, 12:03 PM »
I've been working on the graphics support, and am now displaying all filetypes that are supported by the GDIPlus routines (most likely the supported types are: BMP, GIF, JPEG, PNG, TIFF, WMF, and EMF, and maybe even Exif, but I'm not sure that's an actual filetype).
That is in addition to existing Icon display capability, but because of a lack of transparency in the corresponding control I won't promote that feature much ;)
All this new graphics support is 'limited' to the new borderless type of buttons, that aren't actual buttons :-[, and can best be used combined with the FlipKeycolor feature, to indicate the button has been pressed, instead of the standard 3D effects that buttons have.

Here's a teaser: :P

Screenshot - 24-09-2011 , 18_02_51.png       And with Opacity 96 pressed:    Screenshot - 24-09-2011 , 19_09_13.png

It allows for stretch-scaled and exactly sized images that can be 'shifted' within the rectangle space, most in the example are resized because they share the button-space with the caption label.

The specialities in the sample are (by button caption):
  • gif image: A gif image and a caption combined
  • x3y3: A 'simple' colored button with no image
  • Metro image button (bmp): A double-width button, with a bmp image shifted to left and down, left aligned caption text, like 'Metro' WPhone7/Win8 UI
  • x3y4: A button with an ico file (WBE), and the label on top. (Labels can also be on left or right)
  • Opacity 96: Displays the label on top, and a PNG image with opacity set to 96 (out of 255)
  • to Right >|: Text only button, right aligned
  • Opacity 255: The same Rose PNG image, but with opacity 255 and label at the bottom

I'll be working on the docs and testing some more, and hope to release later today.
« Last Edit: September 24, 2011, 12:08 PM by Ath, Reason: pressed image added »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: On Screen Button That Sends Keyboard Commands: WinButtons 3.5.0
« Reply #192 on: September 24, 2011, 04:09 PM »
Now that nudone kept asking for .png support, I couldn't resist the challenge, so I added that. :P
It requires a different approach of the concept 'Button', so that's why I introduced the 'Borderless button'. And that was another feature request of nudone fulfilled  8)

This Borderless button offers several new layout features, like combining images and captions in several ways, resizing the image, adding offsets to the image-location within the button, and as usual, it's all optional and backward compatible.
With these features it's possible to create a Metro-like UI, as introduced with Windows Phone 7 and Windows 8, by Microsoft. It doesn't mean that I like or dislike that design style, it's just possible to mimic it with WinButtons  ;D

Here's an update release of:
and

Download available from the release message, linking to my DCMembers pages.

Updates can be downloaded also from the WinButtonEdit File/Check for updates option, using DCUpdater when installed.

I'll be doing more testing in the next couple of days.
Any feedback is still welcome, as usual :)

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #193 on: September 24, 2011, 09:45 PM »
Fantastic work, Ath. This really opens up a lot of potential.

I can't test the new version until tomorrow so I have another question: is there no way of defining borders with the new button system.

Maybe just something like custom spacing between the buttons to reveal a different background colour would be good (like WinButtons has done previously).


edit:
I've managed to get back to my main pc so have downloaed the new WinButtons and now see that the border spacing feature is already implemented.  :Thmbsup:
« Last Edit: September 25, 2011, 05:16 AM by nudone »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #194 on: September 25, 2011, 07:11 AM »
Just another little cosmetic request, if possible...

...could the button labels be made to understand a "new line" kind of syntax? So, similar to how HTML works you could wrap long text labels onto new lines.

e.g. something like this command:

"this is the top line<br />and this is the 2nd line<br />and this the third"

would produce on the button:

this is the top line
and this is the 2nd line
and this the third

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #195 on: September 25, 2011, 07:38 AM »
That is one of the features I was going to work on next :up:

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: DONE: On Screen Button That Sends Keyboard Commands
« Reply #196 on: September 25, 2011, 07:45 AM »
That is one of the features I was going to work on next :up:

excellent.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Release: On Screen Button That Sends Keyboard Commands: WinButtons 3.5.1
« Reply #197 on: September 26, 2011, 05:59 PM »
Did some work on the Borderless button with split captions. They can be forcibly wrapped using a @LF@ macro at the desired position(s). That's another feature request of nudone fulfilled  8)

Next update will be for WBE getting a better configuration of all Image parameters (7 comma separated values is a bit cumbersome)

Here's an update release of:
and

Download available from the release message, linking to my DCMembers pages.

Updates can be downloaded also from the WinButtonEdit File/Check for updates option, using DCUpdater when installed.

I'll also be doing more testing in the next couple of days.

Any feedback is still welcome, as usual :)

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 #198 on: September 26, 2011, 07:28 PM »
My feedback is that this all is stellar! Truly, it's first-class work.

I'll have to go back through the relevant topics as I'm having the problem of the cursor wanting to be on the MIMO but that's my fault, I just haven't yet figured out how/where to nail it. I'm sending from buttons, the target is receiving (at least it's reacting) but I've yet to get the desired result.

Now that I have more time I'm looking forward to playing with this some more.

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 #199 on: September 27, 2011, 12:25 AM »
@nudone

I was trying the template you posted.

Whether to Photoshop or to Illustrator, any key action causes a debug dialogue like this

WbutIssue.PNG

to appear. Clicking OK dismisses that and then performs the action.
This is with CS5 on W7-64.

Any ideas?