Photoshop toolbar

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

  1. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Hi,

    I just had an idea but I'm not close to my computer so I can't test it... I think one possible issue with the right-click pan may just be that when you start the AHK toolbar, it automatically starts the right-click pan also. If you've already got the pan going independently, then there may be two pan scripts fighting it out and that may just freeze it up. To test: In the Toolbar_Subroutines file, delete the line that says to start the right-click pan when the toolbar starts (should be around line 525). Is that any better?

    Edit:

    And later on you can always start the right-click pan form the Options menu.
    And if you want to see if there are any AutoHotkey scripts running in the background, just look for AutoHotkey.exe at around 3000-6000 kb in Task Manager. You can kill them there.
     
    Last edited: May 12, 2012
  2. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Well, something strange happened tonight... This became, somewhat unexpectedly, movie night at the lblb mansion. We decided to revisit an old friend I hadn't watched in, I would have to say, at least a dozen years: Tarkovsky's Stalker. Maybe it's because I'm getting old... I don't know... but I was affected in ways I never was with this once-favorite of my early twenties... Is it the fear of getting old? or seeing others around me getting older? or maybe simply that my priorities in life have changed?? or that the arrival of kids (not me, but my sister and close friends) indeed messes up one's perception of the world? If these simple thoughts sound absurdly misplaced or grotesque, they're really not meant to. I guess I'm really just "wondering aloud" how it is that I haven't been affected as much in the last few years by a work of art...

    But anyways...

    I just had a simple question: for the separate Tools toolbar that can be toggled on/off, would it be interesting to have a button (let's say we split the Move button in two) that can be used to transform the toolbar into a hovering icon?

    Unrelated: I just read the thread about you getting a Cintiq. I'm really eager to see how this is going to affect the ongoing discussion. It obviously is a completely different situation than just working on a tablet, but it seems like it could present all new challenges and opportunities. And wow! so much screen space!
     
    Last edited: May 13, 2012
  3. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    I know, screen space...... Mwahahahah! :)

    Re: the AHK Tool Panel-- IMO, if we were to use it, I don't see much of a reason to make it a hover icon. Now that we've Hover Icons in Sai, the value of the AHK bars in it, for me, is for either a) those things not included in the main Sai setup, or b) things I'd like immediately available. I think making it a Hover Icon would slow it down?

    Edit-
    Btw, just thinking about Artrage, and how I wish I could have a similar setup-- Hover Icons and a toolbar. I wonder if we could do a bunch of tiny simple scrips for toggling on tools, and then make a AHK toolbar that would select them?

    Re: Tarkovsky, I've not viewed him, but I know that feeling about growing older. 35 now myself. 'Tis the way, I suppose...
     
    Last edited: May 13, 2012
  4. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Not sure I understand what you mean with the tiny scripts in ArtRage. Do you mean to have something like separate one-button mini-toolbars for each tool? And what do you mean by having the AHK toolbar select them?

    Also, is the right-click pan behaving ok if you delete that line I mentioned in post 281?

    Edit:
    Oh, I think I just understood what you meant. Do you mean to have ArtRage scripts to call up different preset tools?
     
    Last edited: May 13, 2012
  5. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    Re: Artrage-- yes, that's the idea. Simple scripts for common presets, for which we can turn make AHK buttons, like in Sai, that are not just tool specific but preset specific fir different effects.

    Not at a computer, so will check the other stuff later.
     
    Last edited: May 14, 2012
  6. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    I'm not sure what line you want me to delete. This one? ";Subroutine called on to define the main button States for Sai" on line 522?

    edit-- hmmmm. nope. that didn't do anything.
     
    Last edited: May 14, 2012
  7. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Oh... maybe I was looking at a different version of the file. It's the following line:
    Run, png\Options\Right_Click_2.ahk

    It should be exactly where you deleted the lines to prevent the hover icons from starting automatically. In the version I'm looking at right now, it's line 511. I guess this means I messed up somewhere when updating some of my files.
     
  8. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    Ah,yes, that did it. Right-click to Pan is now not automatic in Sai. Sadly, it doesn't solve the problem.

    I think its something with my computer or my copy of Sai. What's so strange is that right-click works everywhere else. And if I reboot, it always works in Sai-- eyedropper works fine, and the AHK pan function works if I start it up. I can open and close files and all is well. But if I close Sai entirely, and then reopen it.... no can do. All right-click function goes away (but only in Sai), whether AHK related or not. Reboot, and all is well again. It's very strange.
     
  9. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Let's try something: delete the line that says #NoTrayIcon in the file for right-click pan. There should now be a tray icon when you launch this file and you can close it by right-clicking on the tray icon.
    When you restart Sai and right-click doesn't work, does it get fixed if you close the pan script with the tray icon? Also, does it work again if instead you just relaunch the pan script?
     
  10. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    Did a bunch of work today on an illustration that I'm getting ready for a portfolio review. Here's what I discovered-- when right-click to Pan stops working, then I can use the upper button instead in Sai right now. I have no idea why. What I also discovered was that if I turn off the entire AHK setup, and then use Sai without it, the eyedropper works, but only on the upper button as well. Start AHK back up, and Pan works again on the upper button only, very consistently too... as I've been using it all day. It seems that somehow Sai has my settings backwards.... This partly explains why the bottom button was doing nothing at all, as Sai isn't reading it as a right-click, but middle click (which we've set up in the ISD settings to use with Artrage for the upper button, which, btw, is doing wonderfully with both buttons right now... awesomely useful). Of course, I have no idea why Sai has the two buttons mixed up! Nor why it seems to work when I first reboot, but then switches after I close Sai down and then reopen it..... ????? It would be nice to get it back to the way it was, as I don't always have my 2-button pen handy. But for now, at least I can Pan while working at my desk.

    I tried out your latest NoTrayIcon suggestion, which functions, but doesn't seem to alter the right-click to Pan issue. I would assume for now I'd just put the line back in.

    Here's the pick I did, btw. Line work in Sai, watercolor work in Artrage. About 5 hours total between the two. The AHK setup is fantastic, warts and all. I'll have a Artrage mockup next week, after I work on this more (I have a host of pics to wrap up/gussy up). I should know very well what I'll want by then, and will have them time to mock it up.
     

    Attached Files:

  11. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Chickens have all the fun! The one in the back seems to be going for some kind of sprinting record! I wonder why they are so happy to escape considering that the character in the background doesn't look like your typical animal molester...

    On another subject: What the hell is going on with your pen, man?

    On yet another subject:
    Attached is my first attempt at a hover icon for the Sai color palette that shows the current color. It's still very much in development but it works on both my computers. For now, it's not very polished and the icon is just a square for the active color, but I can change it a bit (maybe add a black contour) later on. How to use:
    - Since I'm still testing, it may be buggy!
    - Extract the folder in the zip file anywhere on your computer.
    - First, open Sai and show all four windows.
    - Now that all four Sai windows are visible, start the two Hover_5 scripts that are in the folder. There is one each for the Color and Tool palettes.
    - It should work right away (i.e. the hover icon for the Color window should be the color of the current pen color), but if it doesn't maybe change the color on the color wheel and see if the hover icon changes.
    - To close the two hover scripts, just right-click on their tray icons.

    How it works:
    - As you mentioned a while back, the best way to do this seems to be to monitor the color on the Tool palette.
    - So I changed the code for the Color hover icon so that it monitors the small colored square at the top right of the Tool window.
    - To do that, I also had to significantly change the code for the Tool hover icon.

    So does it work at all?

    Possible problems:
    - In the old code for the Tool window, when the Tool window disappeared, the command was to "hide" it. In the new code, when the Tool window disappears, the code is actually to send the Tool window at the relative position of -300 pixels (so if you are connected to a second monitor on the left, you will see the Tool window there). A possible problem (for now) is that when you close the Tool hover script, the Tool window may still be outside of the screen. If that's the case, I've included a Restore_Tool_Window script that, when double-clicked, should bring back the Tool window at +50 pixels.
    - I don't know how this will be affected by the screen resolution... The code looks at the color of the square at the top right of the Tool window. More precisely, it looks at the top left corner of the Tool window, then looks 150 pixels to the right and 40 pixels down. On my two computers, this is the center of the colored square. I just don't know if these distances in pixels will depend on the resolution of the computer that is being used... if you see that the script doesn't work, maybe you can try changing these pixel distances. To do that: launch the AHK Window Info script that is also in the zip file. In the window that opens, select the Advanced tab. Then click right in the middle of the colored square on the Tool window and get the values for "Pos. rel to Window". Then open the Hover_Color_5.ahk file and on line 73 change 150 and 40 for the value you just determined.
     

    Attached Files:

    Last edited: May 15, 2012
  12. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    I tried this out last night, but it didn't work. I'm using this now on my cintiq which is 1280 x 1024 (so a different resolution from my laptop screen), but the truth is that I also tried it on my tablet pc and it didn't work there either.

    The Color Hover Icon would should show the active color while I had the Tools Palette open, but once I moved the cursor off of the Tools Palette and it reverted to a Hover Icon, then the Color Hover Icon would just turn black. It was clearly only reading the info while the Tools Palette was open and in use.

    BTW, I've been using the AHK setup like mad on the new Cintiq, and its wonderful. It's amazing how quickly one can get used to Panning, Zooming, and Resizing all with pen buttons.

    Also, when I would hover over the Color Icon to activate the Color Wheel all kinds of flashing was occurring-- it was clearly having a hard time trying to figure out just what it was supposed to do. ?? So I turned it off for now, though I think it has real potential.
     
  13. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Alright, as with some of the previous stuff, it may take a bit of tweaking to get this to work. The only way I can get the behavior you describe (i.e. gets the right color only when the tool window is shown) is if I use the wrong version of the hover icon for the Tool palette. Are you sure you are using v5 of Hover_Tool_5 from the zip file above (and not the previous v4)? In fact, try using the one in the zip file below (just put it in the folder from the previous zip file above).

    If that doesn't work, let's try a few things (for now let's just try on your tablet or your PC with no Cintiq connected):

    - Close Sai and make sure no hover script is running
    - Launch Sai and open a drawing or start something
    - Make sure all four Sai palettes are visible
    - If the Tool palette is not visible, bring it back by launching the Restore_Tool_Window script from the zip file above (does that work?)
    - Now that all four palettes are on the screen, Launch Hover_Color_5 from the folder in the zip file above
    - From what you said above, the color of the hover icon for the Color palette should be the active color
    - Using the Color wheel, change the color (you can also do it with the right-click eyedropper): Is the color of the hover icon updated to the right color? Try a few times to see if it's reliable.
    - If that works, download Hover_Tool_5_2 below and put it in the same folder. Then launch this new script. The Tool palette should now be a hover icon.
    - Test to see that the hover show/hide thing of the Tool hover icon works as expected
    - Is the icon for the Color palette still ok or did it become black? What if you change the color (on the Color wheel or with the eyedropper)?
    - The black icon and the flashing that you saw are probably because the script can't find the Tool palette or the color square on the Tool palette. If you get a black hover icon for the Color palette, use AHK Window Info.ahk to get the correct coordinates for the middle of the color square at the top right of the Tool palette (which is at pixels 150 and 40 on my computer). To do that: launch the AHK Window Info script that is also in the zip file. In the window that opens, select the Advanced tab. Then click in the middle of the colored square on the Tool window and get the values for "Pos. rel to Window". Then open the Hover_Color_5.ahk file and on both lines 16 and 73 change 150 and 40 for the value you just determined.

    By the way, I'm glad to see that (1) you got your Cintiq and (2) that it works and (3) all our efforts are paying off!
     

    Attached Files:

    Last edited: May 17, 2012
  14. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    Ok, following your instructions I got it to work. So that's good. The issue wasn't that I was using the Cintiq (I believe, although I've not tested that yet), but that I was already running the toolbar with the Hover Icons set to "on". If I run that script and this one it doesn't work. Presuming things are conflicting. I guess the next cool step is to figure out how to get this to work while running the 4-Hover Icon-script. ??

    BTW, an idea that would be nice-- Is there a way to get the Active-Color-Icon to show up while the Color Wheel is open and active? I often have a difficult time figuring out just which color I've picked. Having a small icon to show me that while picking out colors would seem like it would be helpful. Right now, I often have to pick the color, test it, and then pick again. Even with the Hover Icon providing improved information, I still have to pick> let go> see icon> pick again. It would be nice to cut a couple of steps out of that if we could.

    Otherwise, pretty awesome! :)
     
  15. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Cool! Let's try the one below.

    Changes:
    - Now has a border (I actually had to change the code quite a bit for this, so let's see...)
    - The hover icon is in the middle of the Color wheel (that is, when only the wheel is there: it won't be in the middle of the wheel if other panels at the bottom of the Color wheel are present)
    - Tooltip + icon on the right side report the selected color

    Just put it in the previous folder and launch it. Is the color tooltip useful at all? (It doesn't work perfectly for reporting the individual Red/Green/Blue values but I could work on this). Also, the position of the tooltip and the color icon can easily be modified.

    For now, the easiest way to launch them all may just be to launch the two others with the Options window and launch these manually. I'll update the Options file as soon as we are done optimizing these two modified hover scripts.
     

    Attached Files:

    Last edited: May 18, 2012
  16. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    Sweet. Works great. I even ran the rest of the AHK script and the other two Hover Icons, and it all seemed to work well together. Funny detail? The Hover Color Icon shows up as a black square icon on top of the active window when I minimize the Sai window.

    Minor Issue? I'm right handed and so my hand covers up the Tooltip. I thought three basic things--
    1) it would be nice if the tooltip were somehow integrated into the UI of Sai-- or that it atleast looked like it. For instance, to have it appear as a square in the upper left hand quadrant of the Color Wheel-- where it's white, outside of the color circle and below the toggles for other color options
    2) if we could allow for a right-hander versus left-hander checkbox in the setup, that would be cool.
    3) if neither of those work, then just moving it to the left of the color wheel would be an improvement.

    Besides that, it's.... well, really cool.

    edit--
    spoken too soon. I tried it out on my Cintiq, and the Color one works-- its reading the info from the Tools Palette, but the Tools Palette is doing a funky thing. The Hover Icon is there, but the Palette is there too, in another place on the Cintiq screen (to the right of it in the sort of "upper right corner" of the screen-- perhaps in a 100 pixels and down a 100 pixels or so). If I scroll over the Tool Hover Icon, the Palette disappears where it is and reappears "under" the Hover Icon, as if it had always been hiding there. Finish up and move off the palette, and it shrinks down to the Hover Icon again, but the other "normal" palette then re-appears to the right as before.

    Also, there's the typical bit of flashing we get when things are new-- the Color Hover Icon's tooltip definitely flashes quickly and repeatedly on and off.

    edit #2-
    Just decided to try it again on the tablet pc, but with the Cintiq plugged in. So, Sai is now on my tablet pc with nothing really going on on the Cintiq, but with it attached. It works as before, but now that the screen is attached I see that the random Tool Palette is still floating away over there on the Cintiq screen. The Hover Icon is my tablet pc, and if I scroll over it, the Tools palette disappears from my Cintiq only to reappear "under" the now activated Hover Icon. Scroll off the palette, and the Tools Palette reappears on the Cintiq. Thus, perhaps, why I thought it was working earlier-- the truth was that this was actually happening, but I couldn't tell, because the Cintiq wasn't plugged in.

    I even tried just bringing everything over the tablet pc, turning off all the Hover Icons, etc, and the Tools Palette is there on my tablet pc screen like normal. Well, no, what actually happens is that if I turn off the Hover_Tool_5_2, the Hover Icon on my tablet pc goes away, but the Tools Palette is still sitting over there on my Cintiq-- if I go over and grab it, I can bring it over to the tablet pc. I can also run the Restore_Tool_Window script and it does a similar thing. So, I think the Hover_Tool_5_2 is somehow "making" the Tools Palette relocate off-screen from the tablet pc.

    I even tried, for instance, to grab the always open Tools Palette and move it, but no go. It's visible while I drag it, but it always relocates to the same spot on my Cintiq. I can move the Hover Icon freely, but not the always open one. Plus, oddly, when I grab always-open-tools-palette and move it, lets say I'm trying to move it over to my tablet pc-- well, when I let go... wherever I've let go of it at is where the little Hover Icon appears.

    I hope that's all understandable. It's a strange thing, this "duplicate", but it's clearly occurring from the Hover_Tool_5 and Hover_Tool_5_2 scripts.
     
    Last edited: May 18, 2012
  17. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Good to see it works! Now let's try to solve the bugs.

    1) I don't know how I ended up putting the tooltip and icon on the right??? They definitely started on the left (I'm a right-handed too) so I guess I was just experimenting with different things and they ended up on the wrong side... will fix soon.
    2) I think the problem you have with the Cintiq could be solved rather easily (hopefully!). I think it's because your Cintiq is considered a second monitor and that it's to the left of your main monitor. In the code for the Hover_Tool scripts (5 and 5_2), the Tool palette is hidden not by "hiding" it but by sending at at coordinates x = -300 and y = 100. In your setup, that may just be right where you see the Tool palette on your Cintiq. Let's see if the following works: Open Hover_Tool_5_2 and on line 81, change the last number 100 to -300. Does that solve the problems?

    Oh and by the way, you may run into problems when you run both these new scripts and the older Tool and Color hover icons (they were version 4). Maybe you don't observe any conflict for now, but it's probably just waiting to go nasty on you!
     
  18. Steve B

    Steve B Moderator Moderator

    Joined:
    Dec 26, 2010
    Messages:
    2,743
    Likes Received:
    148
    Trophy Points:
    81
    Location:
    Vallejo, CA
    I had to move it to -1000, but then it worked. Tried 300 and 500, and the bottom of the palette was still showing at the top of the window. That's solved though.

    I am getting some flashing when I open up the Tools Hover Icon though-- nothing serious, but its there. Usually flashes once or twice before opening the palette.

    Looking forward to getting the info on the left or in a white space in the Sai Palette. Quite a nice improvement. !!
     
  19. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    Cool. I wonder if the flashing of the Tool window is because it "takes time" to move the palette back from that far? (That may be completely irrelevant... just wondering...) Maybe you could try to send the Tool palette just above your main monitor instead of "passing by" the Cintiq. How about if you set the two coordinates to x=100 (so it stays on the main monitor) but y=-1000 (so it disappears up)? So line 81 would be:
    WinMove, Tool ahk_class sfl_window_class, , 100, -1000
     
  20. lblb

    lblb Scribbler - Standard Member Senior Member

    Joined:
    Jun 28, 2011
    Messages:
    981
    Likes Received:
    116
    Trophy Points:
    56
    See Hover_Color_7 below.
    Icon now on the left side and I put the tooltip below the wheel. I removed the Red/Green/Blue values (since they didn't always work for now) but you can just expand the Color palette to see those (and the tooltip should move accordingly).
    Is the positioning of the tooltip and icon better? Would you see it another way? Note that I can't change the default size of the tooltip or the font as these are Windows settings. But we could try to put other information that you could find useful in the tooltip (or maybe attach tooltips to the other palettes???

    With this and your modified Hover_Tool file, can you describe any type of flashing that you still see? I may not be able to fix all of them, but I don't see any on my PC right now (haven't had a chance to test on my tablet).
     

    Attached Files:

    Last edited: May 18, 2012

Share This Page