Photoshop toolbar

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

Thread Status:
Not open for further replies.
  1. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    First- this is kinda fun for me too, so all's cool. If you don't feel like I'm wasting your time, I don't feel like you're wasting me. :p

    Second- I ran Window Spy, and this should explain why nothing's been working-- not even the most recent version you tried out. It's not listed as "Sai".

    Here's the results for all the programs-
    Sai-
    ahk_class sfl_window_class

    Artrage-
    ahk_class ArtRage 3

    Sketchbook Pro 2010-
    ahk_class com.alias.TpWin32SketchWindow

    Sketchbook Pro 2011-
    ahk_class com.alias.TpWin32SketchWindow


    BTW, all this discussion helped me see how I could use Lasso, Transform, and Enter in Stroke It, using a different gesture for each one. So, even if this doesn't pan out, it's really made me think out of the box, which has been very helpful.

    ***zoooooom bar...... zooooom bar.....**** LOL.
     
  2. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Indeed zoombar! I'm not working on it right now but my mind is going a little wild on that one... could it work with a slider with a handle? or ideally a strip like the ones in the EP121 AHK script (that would be awesome)? or just a column of smaller zoom in buttons hidden under a strip image?

    Below are versions that could work in Art Rage and Sai according to the Window Spy data you sent. Let's see if these work! The idea here is really that when you hit the toolbar, the program loses the focus (i.e. the toolbar becomes the active program) so that you have to reactivate the program (by calling back its ahk_class name) before sending the actual command.
     

    Attached Files:

  3. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    Okkaaaaayy, the beginnings of success!

    Drop does indeed now activate Ctrl + Alt. What's most cool about it is that it doesn't seem to be "timed" to release in the way I thought it was going to be. This is cool because, essentially, I can hit "Drop", slide my pen to resize on the fly for as long as I want without it "releasing" the buttons, and then, when I lift the pen, it releases the buttons automatically, so I can go back to drawing. So, this button is currently working perfectly.

    Grab works.
    So does Zoom In and Zoom Out.
    So does Brush Resize.
    Brush works, though it sends it to Airbrush right now because of the default key mapping settings.
    Eraser works.
    Undo (Ctrl + Z)works.

    Now, the issues-
    a) Redo (Ctrl + Y) does not currently work. Perhaps it's listed as a different command in the current script?

    b) Undo doesn't automatically "repeat" the strike on the key when I press down on it, so no quick Undo's in succession, but instead the ol' *tap tap tap tap tap*.

    c) F11 (the scissors icon right now) works, but it sets into motion a weird sequence of events. If I press it once and then twice it works normally, as there are two versions of the F11 Full Screen mode in Sai that occur in sequence- one where the Taskbar goes away, and one where even the strip of pull down menus in Sai goes away as well as the Taskbar. Up to this point, things work. However, if I press it again normal things stop happening. Normally, if I press it again it brings everything back, Taskbar, row of pull down menus, etc. It's a sequence of 3 actions programmed to occur in order using the one F11 button. However, if I press the AHK button a 3rd time, suddenly the entire AHK toolbar goes away. If I shrink Sai, there the AHK toolbar is, under where Sai was. However, if I maximize Sai again, AHK wont return and float above it. In fact, the only way to get it to return is to close AHK completely and then reopen it. A very strange process.

    d) Also, on the Drop button- if I'm using the pen, and then decide to sort of quickly resize the eraser by pressing the Drop button with the eraser end of the pen (instead of switching to the eraser tool first and simply using the tip of the pen), it will resize it (like normal), but if (after having erased something) I then flip the pen around to go back to using the tip of the pen to continue drawing, the tip of the pen is no longer the Brush, but instead is now changed to be the eraser. Essentially, using the Drop button to resize the eraser end of the pen is turning the tip end of the pen into an eraser as well. The only way to fix it is actually click the icon to get it back to the Brush/Pen, etc. It would be nice to be able to flip the pen over to the eraser end, hit the drop button with it, resize the eraser and use it, then flip the pen back over and use the pen-tip end to move directly back into drawing again.

    e) The Save button is not saving. It is making the canvas rotate in increments to counter-clockwise (what the Delete buttons does). Save is Ctrl + S by the way, in Sai.

    f) Ctrl and Shift are not working yet. ???

    g) Finally, I also liked having the Save button be a small button at the top, as in the PS script, with the "X" close button not an option. I agree that being able to close it for real in the "hidden icons" section is just right for me.

    Hope that helps!
     
  4. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Cool news (mostly!)! Alright, that was more complex than expected... but we're kinda getting somewhere!

    I'll carefully look into what you wrote here (and above) later this week. In the meantime:

    1) Below is a version in which redo should work (it was somehow sending ctrl+r instead of ctrl+y)
    2) I'm puzzled that Save doesn't work but I've changed the coding a bit. See if it now works.
    3) Now that we know a bit better about the kind of stuff that can be done with the modifiers and everything else, how about you describe exactly what your ideal toolbar (minus zoombar for now!) would look like.
    4) Particularly interesting would be your layout and choice for the modifiers. I think I can have pretty much any modifier combination in one button, as well as individual buttons for each modifier. I also think that you should be able to add up the individual modifiers (you can test right now with ctrl and shift). And then there is the timing aspect. Also, if it's not ok right now, I think I can have it send a specific command when a modifier is released.
    5) Would it be useful to have a "release all modifiers" button?
    6) If you want to be able to use the brush, you can change the code on line 89. If the hotkey is just a letter, put it between the wiggly brackets. If it's ctrl+letter (let's say it's ctrl p), then replace {b} by ^p
    7) Do the Ctrl and Shift toggles work now?

    And if you discover anything great or not so great in the meantime, just report back here.
     

    Attached Files:

  5. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Hey thatcomicsguy,

    I've uploaded a modified version of your script. See here:

    Edited_by_thatcomicsguy_toolbar_1_3.zip

    I added the following:
    Instead of sending l (small), the lasso button now sends L (capital). This allows you to cycle through the different lassos (and get to polygonal selection) by pressing repeatedly on the button.

    I've also added a Shift and a Alt toggle. I don't know if it works for you but for me they work very well for the add and subtract selection. Once you've made your first selection with any of the lassos, press either Shift or Alt: it looks like the selection is lost but it actually isn't. So if you just click on the screen once, the selections reappear and you can then add/subtract at will. While you have many selections and subtractions, you can toggle shift and alt and the different lassos at will and it won't lose selections. Does it also work for you (I'm using Photoshop 8.0)? Was this what you were looking for?

    Oh and by the way, that thing I did with the lasso can be done with the eraser (change e to E) and the brush (change b to B). In fact, since B corresponds to shift b, if you prefer you can leave the lasso, brush and eraser with small letters then cycle through the different ones by first pushing the shift toggle before hitting the buttons.
     
  6. Steve B

    Steve B Moderator Moderator

    Messages:
    3,381
    Likes Received:
    564
    Trophy Points:
    181
    Lets see....

    1) Redo now works, both in Artrage and Sai
    2) Ctrl and Shift also work, in both programs
    3) A "release all modifiers" button has less interest to me than making a few more buttons with more specific key modifier combinations in each one, like the Ctrl + Alt combo. That then takes away the need for the "release all modifiers" button.
    4) Undo does not do "repeat" undo's if the pen rests on it for a long time. I'm not sure if you'd gotten to that or not, but I thought I'd mention it.

    I'll ponder in more detail the setup I'd like for Sai and SBP, but I would say, off the cuff, that the needs of Artrage are easier to understand, because it differs differs from Sai and is better setup for use on a tablet pc from the get go. You won't need the "Hand" icon, because right click while moving already does that. You also won't need the typical "Full Screen" button because right click hover does that. Artrage also doesn't seem to have a true "Full Screen" option, where you can put away the taskbar, so that's out as well.

    However, in Artrage more commands are tied to using modifiers and the pen in conjunction. Also, different commands have different "timing" needs.

    Alt + hover click allows you to rotate the screen. What would be very nice is to hit the Alt key, have it stay depressed for a few seconds (2?), press right click, and then rotate (while hovering) to the exact angle you want at one's leisure, with the Alt button staying pressed until the release of the Right Click. Rotating often takes a while to get the canvas angle just right, and right now, for example, in Modlock once the Alt key "timer" runs out your canvas is stuck at whatever angle you had it at until you press Alt again and continue the process. That's not super useful. If the "release Alt with release of right click" idea wont work, then Alt needs to have a longer timer-- 3 seconds perhaps?

    Alt + Ctrl in Artrage pulls up a mobile Color Picker. Right now, the "Drop" button is working just right for this. There's enough of a delay between pressing the button and pressing your stylus tip against the screen for the Picker to appear, and as long as I have the pen tip touching the screen the Color Picker remains on screen. This is very nice, because it also can sometimes take a while to pick the right color. This is how I wish the Alt button worked (although I recognize they're different, since Alt + Ctrl depends on the stylus input to the screen, and Alt + hover click depends on the input of the right-click button).

    Ctrl + tapping the screen with the stylus allows you to set a starting point and then draw a straight line to another point which you tap with the stylus. The fact that the Ctrl button stays depressed until you tap the Ctrl button again works good for this function, because you're often doing multiple straight lines in a row. Artrage also allows you draw different straight lines with different starting points one after another, so you don't have to unclick Ctrl to move to a new place on the canvas. Thus, hit Ctrl button, tap screen in one spot, tap screen in a 2nd spot, and voila a straight line. Then tap screen in a 3rd and 4th spot and voila another line (not necessarily touching the previous line in any way), etc. Continue ad nauseum until you hit the Ctrl button again. So, the lack of a "timer" works well in Artrage for this button.

    Shift + hover click while moving your stylus above the screen allows you to zoom in and out. Shift + dragging your stylus on the screen allows you to resize your current tool. For both of these it would be nice if I didn't have to go back and re-tap the Shift button to release it. It would be very cool if I could somehow release the right-click button while hovering and zooming to release the Shift button. And it be very cool if I could somehow also release the Shift button by lifting the stylus from the canvas when resizing the current tool. Essentially, I'd like both of these to (I think) work the way the "Drop" button works. Of course, I'm doing two different things with the Shift button, so I don't know if a "if a then b, but if c then d" sort of method can be done in AHK. If need be, there's no reason these two functions couldn't be two different buttons. They both share the same modifier key, but they do two totally different things. That might be an idea too.

    Also, a "reset canvas rotation" (to original 180 degree (upright) position) button would be nice to use after having rotated the canvas to some quirky position to get the right angle to draw something. This is Alt +D.

    I'm sure there's more, but they're probably mostly just key shortcuts-- easy to program, but harder to figure out just what would be most useful to have. I figured I'd start by giving you these issues with the modifier keys for you to fiddle with.

    I'll get back to you later with more detail on Sai. Thanks!
     
  7. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Thanks Steve for the detailed answer. That's going to be very helpful when I tackle this. Should be fun!
    Goddamnit... I just realized that the EP121 comes with ArtRage installed (for keyboard reasons I have been doing most of the programming on my other main computer). I don't know if it's a complete version but there is a serial number and all so maybe I'll actually be able to try the different button combinations! Should've probably thought about this earlier...
     
  8. thatcomicsguy

    thatcomicsguy Pen Pro - Senior Member Senior Member

    Messages:
    3,264
    Likes Received:
    2,314
    Trophy Points:
    231
    Re: Lowercase v.s. uppercase in the "send" command.

    Interesting. That's a cool discovery, getting PS to cycle through the various tool configurations.

    I found it a bit over-complicated to work with. The point of a side bar for me is to make actions easy and muscle-memory-ish. I don't expect this kind of tool bar to be able to do everything, but rather just effectively enable one type of work, (pencil sketching), and if I need to perform more complex operations, then I'll just open the full PS toolbar system and use a portable keyboard for other stuff.

    Though. . , if the Lasso button sending the upper case "L" cycled through graphically which tool version it was using, it would be easier to work with. But I don't think that's necessary for my purposes.

    The Shift and Alt lock, I just noticed, have the same characteristic as the space toggle; they stay in the last position they were set to after the program shuts down. I noticed this while trying to select some text; the Shift key was in the 'down' position and altered the cursor selection function accordingly. The solution to that would seem to be to give the bar a proper close button again which would first return all the buttons to default settings before closing.

    For my part, I'm quite happy with the previous version I notched together. I will, however, remove those code appendages you pointed out in your PM.

    Though, check out this idea. . .

    It would be pretty easy, I think, to have a small button at the top, (like the hide/show button) which toggled between a PS bar and a Sai bar, or whatever other program was part of the user's preferred workflow.

    This wouldn't be as smooth as a Bar which automatically detected which program was in focus and re-configured the buttons and their functionality accordingly, but it should be fairly easy to code and it would be immediately useful.

    Just a thought. I might try to work out how you made the show/hide button work, and then try to implement a PS/Sai bar-switcher button.

    Cheers!
     
  9. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    Cool. I understand your point of view. I actually thought the add/subtract functions worked beautifully, but I'm probably never going to use those! Did they actually work for you? I thought that's waht you were refering to in a previous post. For me, they are actually easier to use like this than if I were using a keyboard!

    If you wanted to keep the toggle buttons on there, as I said in the PM it would be very easy I think to have an icon on the taskbar or in the system tray that closes the script but also toggles up all the modifiers.

    The toggle button for different programs as you mention was very much what I was thinking for as a first approach to have a program-specific toolbar. I won't have time to try it this week, but if you try to make that work don't hesitate to share your discoveries!

    When I have time next I'll try to see how I can have a button repeat its action when it is kept pressed. As Steve mentioned, it would be very useful for Undo and Redo. It could also be very cool for zoom in and zoom out (especially since a zoom bar seems a bit challenging with my current level of AHK knowledge).

    Anyway, that stuff is all pretty cool!
     
  10. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,197
    Likes Received:
    240
    Trophy Points:
    81
    I'm just amazed that by putting our brains together and using what little we know of AHK, we could come up with the toolbar you now have in less than three days! Looks like it could be a very useful little tool!

    For the toggling of the toolbar, if you look at the coding, what the button actually does is hide parts of the toolbar. So it's not really rolling it up or down. Among the ways that I've thought about doing this:
    - Maybe you just develop a huge toolbar that contains all the individual ones (and then you use toggle buttons to hide/unhide certain parts)
    - Something else that could be tried is kind of like what happens when the image on buttons changes according to the state of the button. Maybe it's possible to change all the buttons at once by using such a toggle...
    - Obviously, if it all switched automatically when the program is changed it would be great! Already considering a few possible ways of doing this...
     
Thread Status:
Not open for further replies.

Share This Page