Photoshop toolbar

Discussion in 'Artists' started by lblb, Feb 3, 2012.

Thread Status:
Not open for further replies.
  1. thatcomicsguy

    thatcomicsguy Pen Pro - Senior Member Senior Member

    Messages:
    3,264
    Likes Received:
    2,314
    Trophy Points:
    231
    I hope you don't mind, but I wanted to try my own noodling with your button-bar.
    PS-SAI-Bar-Version2.zip

    I learned from how you performed toggling, and applied that so the transform button would toggle between two states. When you press it, it either sends a "Ctrl T" or a "Return" depending on what it last did. That way, when you finish transforming the selection, you just hit it again and it completes the action. (It has a slight bug; if you press it when there is nothing selected, it still toggles, but this doesn't seem to affect anything else. To get rid of that, I'd have to find out how to test whether or not there is anything selected in Photoshop, and I don't know how that's done.)

    I also shrunk down the Save image and re-adjusted the button bar layout according to my ideal. It's now basically my perfect system for Photoshop tablet work! I hope you don't mind my having taken liberties with it.

    I should note that for some reason, your button bar works much more smoothly than mine did. My old one wasn't nearly as responsive, and sometimes I'd have to tap the button more than once to get it to work. Don't know why that was.

    Also, may I have permission to post your creation, (my edited version) on my website? I'd give you full credit, of course.

    Cheers!
     
    Last edited by a moderator: May 18, 2015
  2. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    thatcomicsguy,
    I most certainly don't mind that you modify it any way you want and share it! I'm in that weird position where I'm working on this script yet I'm not really going to use it... just tryin' to learn to program with Autohotkey. I will be more than glad if someone who is really going to use it can make it his/hers!

    If you are to give full credits, you should maybe add that, although it is completely unrecognizable right now, the foundations of it ultimately come from here:

    Photoshop toolbar

    Cheers mate! Don't hesitate to post back with impressions, bugs, improvements and everything once you've used it for a while.
     
  3. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    I got a chance to really look at this. I like the setup, but I don't seem to be to use it it in Sai. I understand that PS must have some different commands, but I thought more of them would cross over. I mean, Ctrl + Z is undo in PS, right? Or is the way this script is working is that it only works when PS is working? I'm sort of used to stuff like Modlock (which is also AHK I think), where it works regardless of what program you're running. If that's true, and you're pondering writing something up for Sai, here's some of my thoughts on what would be most useful-- atleast to me.

    As before, I use Stroke It to do all the basic key functions that can be done by simply pressing a single key once-- switching tools (pen, brush, blur, eraser), tab (to bring menus back or make them disappear), and zoom in and zoom out (page up and page down). Although I think the idea of having some of these single button commands actually being buttons sounds nice, I'm most interested in achieving the functionality I can't get out of a single gesture. This means a) commands that require me to hit more than one key and hold them while using the pen (key modifiers like Ctrl, Shift, etc), b) commands that require a slider (zoom), c) commands that require me to hit one key, use the pen, and then hit a second key to finish (lasso, transform, and enter), or d) commands that I might need to hit repeatedly in quick succession (undo). So, having said that, here's some of my thoughts.

    1) The zoom bar that I've seen in the touch enabled scripts you guys have going on the Asus ep121 looks awesome. If that could be done for any and all programs that in itself would be gold, as I don't have a very good solution right now. I want zooming to be smooth and incremental, and right now it's POW zoomed in and then POW zoomed out, which works but isn't optimal. What would you need to know to about Sai to work? The default buttons for zoom are page up and page down in Sai, but clearly they don't quite do what I want, and it's what I bind my Stroke It gestures to currently. Sai does actually have a sliding zoom feature (on the Navigator)-- you just need the menus in view to use it and I want to be able to do that without all the other menus there.
    2) Save option is nice (Ctrl + S in Sai)
    3) Same goes for the moving toggle
    4) Same goes for the "reduce" toggle for AHK bar
    --> essentially the top bar is nice. I like the size of the buttons, and that they're not wider than the two button width below.
    5) The timed key modifiers are important. Ctrl + Alt is very important in Sai because it lets you drag to resize your brush. I also use Shift though, for example, to easily do straight lines.
    6) Undo (Ctrl +Z) and redo (Ctrl + R) are nice too. One thing that would be nice is if you could sort of hold and press the Undo and it would work like the hardware buttons do, where it just sort of repeats the input in super quick succession. This would be nice, instead of having to "tap tap tap tap" very quickly to undo.
    7) It would be very very cool to hit the Lasso, use it, then hit the Transform button to scale/ rotate/ move/ free deform, and then hit it again to hit "Enter". It would also be nice if, when I hit enter, the program defaulted back to whatever I had before I used the lasso, so I could get back to business. I don't know if that's possible, but I might as well ask. ;) If this is what thatcomicsguy is doing with this script, I'd love to have that in Sai. Lasso is L, and Transform in Sai is Cntrl + T.

    Including the zoom bar creates complications design wise in my mind. I also prefer the vertical orientation- I think because it allows me to easily access all the buttons without it getting in the way of a the majority of the work in the center of the pic. However, I also like the pairing of certain buttons, like the Lasso and Transform tools, the Undo and Redo, etc. That's nice. Thus, I think if you kept it vertical you would either need to a) have 3 vertical rows, with one of them being the sliding bar, or b) you would need two rows and the "paired" commands would be one above the other instead of side by side.

    You could also try a horizontal orientation. This would allow the "paired" buttons to still be side by side, with the zoom being above them in its own horizontal bar. This could work, depending on how big the whole thing was, and if it got in the way of painting. I DO think the zoom bar would probably need to be as thick as the current buttons are, just so you wouldn't be inadvertently hitting other things while sliding on it.

    The other thing is that we've got atleast a few key modifiers to lay out. As such, even if the zoom bar is taking the place of some buttons that are being removed, I see the need for new, different buttons as well- Ctrl + Alt, Shift, etc. Hmmmm....

    To me, that means that, if you were just going to tailor it to what I currently think is essential in Sai, there would be 6 buttons (Lasso, Transform, Undo, Redo, Resize, Straight Line), plus the bar. That means I'd probably have it stay in the orientation its currently in, just with one extra button on the bottom, thus also making the slider a bit longer too.

    Of course, the real thing is if it were customizable, so that I could somehow piece together the buttons I wanted if my habits changed, and to have it be customizable by program. ?? Thus, we begin to enter the real of ModLock+ Funky Bar + zoom bar. It's just totally cool to me that we're even discussing that this might be doable. Very cool stuff.

    edit: Oh, and yes, when sai runs its sai.exe in the Task Manager.
     
  4. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Steve B,

    1) I really don't have time right now so this will be a very very bastardized version. I've uploaded a version (of something like the original toolbar I uploaded) to try out some of the stuff you mentioned. I am really in a hurry so I haven't had time to change the icons, I'm just trying to show you the potential. See here:

    Photoshop_Toolbar_v2_SteveB_Demo.zip

    2) Does the Ctrl toggle work for you? I haven't tried to do it but if ctrl works, I should be able to find a way to get a ctrl+alt toggle to work too. Also, you should be able to do toggle combinations with the ctrl and shift buttons.

    3) The drop button should actually be a button that holds down ctrl+alt for one second then releases it. Does it work for you? If it works, open the ahk file in a text editor that numbers the lines (I use Notepad++) and you can change the delay (in milliseconds) on line 145. (In fact, the code for this is way simpler than the one for "simple" toggles like in 2) above.) By the way, for this button and the toggles, you can "follow the action live" if the TIP is opened when you are pushing the buttons.

    4) It is actually expected that the redo/undo buttons on thatcomicsguy's toolbar won't work in programs other than PS because they are not in fact undo/redo, they are step backward/step forward. Do the undo/redo buttons on what I just uploaded work for you?

    5) I don't have time to do it but you can try the following for your F11 button:
    - Open the ahk file in a text editor that numbers the lines.
    - The best way to know what each button does is probably to first start by looking at the name of the image for the button. For example, on line 21 is the "cut" button as seen by the name "cut.tif". The "gc13" term on this line is the name of the button. The action associated with this "c13" button is found if you scroll down to line 70. While line 73 is just to make sure that the "hand" tool is released when you hit this "cut" button (this is irrelevant to this discussion), line 74 says that the button will send "ctrl x". If you change it to "send {F11}" I think it should work for your purpose. So make that change, save the file, launch the ahk script, and the "cut" button should now be a F11 button.

    6a) Of course, all of this will become completely irrelevant when the supreme EP121 AHK script is adapted for other systems... Completely irrelevant. Period. I mean: how can a flimsy toolbar compete with something that allows you to have both pen and touch input at the same time, especially since the touch input doesn't steal the cursor away from the pen??? It's pure gold! And you're right, the sliders on that thing are, dare I say, even better than sliced bread. For proof of that, see the kickass ArtDock app that was just posted in the Samsung S7 forum.
    6b) In my opinion there are only 2 things wrong with the EP121 AHK script:
    - First wrong: It only works for the EP121 and the S7. Although you may be happy to know (hold your breath) that someone finally asked about the x201t on the developer's blog... If history serves you well, this may mean that you are just a few days away from having that script work on the x201. There may be hope just yet...
    - Second wrong: For some unknown reason (and maybe that's just the soft-hearted Canadian in me talking), many people have been modifying that script into amazing apps yet they fail to acknowledge the work of the developer of the original script. I can't find a single message on his blog about EP121 or S7S users from this forum thanking him for revolutionizing the way we can interact with Windows tablets. I mean, that dude is doing all this incredible work by himself yet apparently no one bothers to thank him. Hopefully, all of these people sent him personal messages to thank him...

    Anyway, thank you very much for the detailed response, I'll try to address your questions more carefully when I have time later this week. By the way, do you actually use Funkybar? I know the EP121 forum might not have been the right place to start a thread on it (i.e. because of the AHK script) but I'm really surprised that the Funkybar thread didn't get any traction at all...
     
  5. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    Re: Funky Bar, I was also surprised there was practically 0 traction there as well. Perhaps it's because of the fact that the touch enabled script is available, and makes it sort if defunct. It even makes Modlock defunct, because you can press and hold modifiers with one hand while drawing with the other.

    The difference is that thatcomicsguy and I aren't using touch enabled tablet pcs. As such, all input mist be done with the pen and with one hand. That changes how things function- particularly with things like modifier keys, etc.

    Re: the current S7/ ep121 script, I would be exceptionally happy to use it on my x200t, except my computer isnt touch enabled so it didnt seem like a possibility to even dream it. Does that matter? Do you know if it's being ported to an x201t that has touch? Or is it pen only like ours?

    Re: my super detailed response- that was just meant to be helpful and involved. Nothing presumptuous!! I am very aware that youre doing this with your own free time for fun!! :)
     
  6. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    I'm pretty sure a Wacom driver and touch are necessary for the EP121 AHK script to work (and the guy on the blog says "my X201t also uses Wacom ISD Dual touch driver".) I was actually mentioning that because I thought you still had a x201t but I obviously forgot to check your signature...

    If my answer sounded like I was not pleased with your answer or something, it wasn't the case at all (I can see now that it may give that idea). Me insisting that I didn't have time on my hands was not a you-need-to-respect-my-time warning at all, it was really meant as a sorry-at-this-point-I-can-only-offer-some-incomplete-info message.

    That being said, I hope to have time to work on this later this week. In the meantime, when you have a chance could you download the file I uploaded in the previous post and tell me if the various things that I suggested work for you? That would be very helpful, thanks!
     
  7. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    A few more questions:
    - Would it be useful to have a "release all modifiers" button?
    - Can you tell me (for my first go at it) exactly what modifier buttons you would like to have and what layout that would be:
    ctrl?
    shift?
    alt?
    ctrl + shift toggle?
    ctrl + alt timed toggle? and what delay?
    etc.
     
  8. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    Unfortunately, right now none of the changes are working. I can clearly hit the buttons, and it seems to be activating something because the word "Ctrl", or "Ctrl + Alt", etc. will appear onscreen near my cursor, but nothing happens. Undo and Redo also don't affect the program. Right now, none of the buttons actually do anything in Sai. It is just as if they were working (I can see them and press them, and when I do I'm no longer drawing in Sai, so it's as if I'm directly working with the AHK script instead) but its as if it were affecting a different program that I just can't see.
     
  9. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    In each button's code there is the following (which activates the Photoshop window before sending the command):

    ifWinExist, ahk_class Photoshop
    WinActivate, ahk_class Photoshop

    If you replace Photoshop by Sai in the two lines above, does the button work (for example on lines 99 and 100 for the undo button, and 106-107 for redo)?
    Alternatively: If you delete these lines from any button's code, does the button now work in sai? (The sai window may lose focus if these lines are deleted... not sure.)

    Update:

    Ok I think changing Photoshop for Sai on these two lines should work. Below is a modifed ahk file. If you swap the original for this one, do the buttons now work?
     

    Attached Files:

  10. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    By the way Steve B, thank you so much for all your feedback. And don't hesitate to tell me if you don't want to be involved in this, I really won't be offended if you say that you don't have time to try these things out! You're somehow way more involved in this than I thought anyone would be when I started this thread and I will completely understand if you're annoyed by all my questions!

    This is thus a perfect segue for the following question:
    Could you fire up Window Spy to tell me the ahk_class for each of the programs that you are interested in? You can just launch the ahk script in the zip file below, right-click on its tray icon and choose Window Spy. Then start any of your art programs and note down the name that appears after ahk_class on the third line of Window Spy.
    If the ahk_class name for Sai.exe is indeed sai, then the file in the previous zip file should work. Also, note that in this and the previous post I'm essentially exposing the ideas that I hope to exploit to have a toolbar that can change according to the active program
     

    Attached Files:

Thread Status:
Not open for further replies.

Share This Page