Toolbar Creator - v. 2.2 beta available for download!

Discussion in 'Software' started by lblb, Jun 27, 2014.

  1. Yoaklar

    Yoaklar Pen Pal - Newbie

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    5
    Just downloaded this. Is there a place that explains how to use it? A site or help file? Thank you
     
  2. surfaceproartist

    surfaceproartist Scribbler - Standard Member Senior Member

    Messages:
    2,836
    Likes Received:
    1,725
    Trophy Points:
    181
  3. moniz

    moniz Pen Pal - Newbie

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    IbIb, add me to the chorus of people thanking you for all the work you have put into this fantastic program. I have been looking for something like this for 10-15 years as I teach with a tablet. I am presently setting it up for use with powerpoint presentations (lecturing). I haven't seen mention of powerpoint in this thread and have one question: Is it possible to choose pen color as in the old "powerpoint pen-only toolbar"? I have autohotkey installed if that is needed. But beyond that I'm clueless how to proceed. Thanks again for your wonderful work.
     
  4. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,160
    Likes Received:
    224
    Trophy Points:
    81
    @moniz

    Thanks for the kind words!

    Indeed there is nothing specific about PowerPoint in Toolbar Creator, but if you're willing to try a few things, I think I can help you achieve what you want. I am also a teacher and I use Toolbar Creator with PowerPoint all the time. It's very easy to add and use commands to, for example, change pen color, and other stuff like that.

    If you are ready to try a few things, all we need to do is add a few custom commands as is described in section 3 (on page 3) of the Advanced Instructions that are posted in the first post of this thread. Just let me know what kind of stuff you would be interested in and I'd be happy to help you.
     
  5. moniz

    moniz Pen Pal - Newbie

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    Thanks. I confirmed that I can edit the presets and run a simple hotkey from your_toolbar (Type 5 button). My needs are basic, things that you had in the other program. Specifically, RGB and black pens and the ability to insert a new slide during a presentation. I saw VBA macros that you posted for these functions in an old thread (e.g. red pen below). But I assume autohotkey wants a different kind of macro? Thanks for any advice.

    Sub PPToolbar_RedPen()
    With SlideShowWindows(Index:=1).View
    ' Change the Red/Green/Blue values to get desired color
    .PointerColor.RGB = RGB(255, 0, 0)
    .PointerType = ppSlideShowPointerPen
    End With
    End Sub
    Is this
     
  6. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,160
    Likes Received:
    224
    Trophy Points:
    81
    @moniz

    That's easy to do. I can posts some code here soon. Do you use a specific version of Windows (Win 7? Win 10? and also 32 vs. 64 bit?) and a specific version of PowerPoint? Or do you intend to use it on various computers with potentially different versions of Windows and/or PowerPoint?
     
  7. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,160
    Likes Received:
    224
    Trophy Points:
    81
    @moniz

    The following works for me in Windows 7 and Windows 10 (64bit) with PowerPoint 2010 and 365 to switch pen colors and add a slide during a presentation (you will need to have AutoHotkey installed).

    1) Following the instructions on page 3 of the pdf file in the first post of this thread, delete "Your Toolbar.exe" from the main folder of Toolbar Creator and put the source code of the toolbar "Your Toolbar.ahk" in the main folder. From now on you will need to use this ahk file to launch Toolbar Creator. For the next steps, note that in AutoHotkey a line that begins with a semi-colon ; is for commenting and is ignored so it's not a real command (i.e., you can erase it without affecting the command).

    2) For Windows 7, I found that nothing needed to be changed to the file "Your Toolbar.ahk". For Windows 10, you may need to remove the following lines near the top of the file "Your Toolbar.ahk" (if I leave those lines in in Windows 10, nothing happens when I try to change pen color but you may observe otherwise depending on your security settings):
    Code:
    If not A_IsAdmin
    	{
        Run *RunAs "%A_ScriptFullPath%"
        ExitApp
    	}
    
    3) At the very bottom of the file "Presets.ahk", which is in the Files -> Includes subfolder, add the following code:
    Code:
    PPTAddSlide:
    WinActivate, ahk_class screenClass ahk_exe POWERPNT.EXE
    Try
    	{
    	ppt := ComObjActive("PowerPoint.application")
    	MyView := ppt.ActivePresentation
    	Current_Slide := MyView.SlideShowWindow.View.Slide.SlideIndex
    	; Get the index of the new slide
    	New_Added_Slide := Current_Slide + 1
    	;New_Layout := ppLayoutBlank
    	; Blank = 12
    	MyView.Slides.Add(New_Added_Slide,12)
    	;Add a transition for the new slide, slide from left
    	MyTransition := ppt.ActivePresentation.Slides(New_Added_Slide).SlideShowTransition
    	MyTransition.EntryEffect := 3853
    	MyTransition.Speed := 3
    	;Go to new slide	
    	MyView.SlideShowWindow.View.GoToSlide(New_Added_Slide)
    	ppt:=""
    	}
    Return
    
    PPTBlackPen:
    Black=0x000000
    PenColor(Black)
    Return 
    
    PPTBluePen:
    Blue=0xFF0000
    PenColor(Blue)
    Return
    
    PPTGreenPen:
    Green=0x008000
    PenColor(Green)
    Return
    
    PPTRedPen:
    Red=0x0000FF
    PenColor(Red)
    Return
    
    PenColor(Color)
    	{
    	WinActivate, ahk_class screenClass ahk_exe POWERPNT.EXE
    	Try
    		{
    		ppt := ComObjActive("PowerPoint.Application")
    		MyView := ppt.ActivePresentation.SlideShowWindow.View
    		Color_Num := Color , Color_Num += 0
    		MyView.PointerColor.RGB := Color_Num
    		MyView.PointerType := 2
    		ppt:=""
    		}
    	}
    
    4) To make the pen and add slide commands accessible through the "Customization" tab of the Toolbar Creator Options window, you need to add them to the dropdown menu for the Type 5 button. This can be done by adding the following
    Code:
    ,PPT Add Slide,PPT Black Pen,PPT Blue Pen,PPT Green Pen,PPT Red Pen
    at the end of the list of commands for Type 5. So you need to add the text at the end of line 29 of the file "Presets.ahk".

    5) Restart the toolbar and everything should be ready to go.

    6) Nota that In the PenColor code in point 3) above, the line
    Code:
    MyView.PointerType := 2
    is not necessary if you are using Windows 10.

    Let me know if you need more help or if the above doesn't work like it should.
     
  8. moniz

    moniz Pen Pal - Newbie

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    Thanks for the beautifully detailed instructions, this worked perfectly. Really, thanks a million for your generosity. I'm not kidding when I say I have been looking for something like this for 15 years. It will make lecturing with a tablet so much simpler and more pleasant. I'm starting to see the possibilities to use custom toolbars to make multiple programs more what I want rather than what the designer wanted. One question if you get a minute - do you have any suggestion for how to learn about writing code to access functions in various applications (similar to the powerpoint examples you have shown for pen color, adding a slide, etc)? I'd need to know variables, naming conventions, structures for the apps (current_slide, color_num, etc) but I'm not sure where to start.
     
  9. moniz

    moniz Pen Pal - Newbie

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    5
    IbIb, I have a problem with the toolbar I made for powerpoint presentations and wonder if you have seen this. I have buttons assigned for different ink colors, the arrow pointer, and other things. I am able to switch between any of the toolbar functions except frequently while running a presentation I cannot return to the arrow pointer. This stops me from using ink, then clicking on an embedded video, then returning to ink. I am using the ctrl-A hotkey and sometimes it works okay, other times not. If I am in normal view, pressing the key selects all objects on a slide, consistent with it issuing a ctrl-A. The function for the arrow pointer just doesn't work reliably during a show. Have you ever seen this?
     
  10. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,160
    Likes Received:
    224
    Trophy Points:
    81
    @moniz
    I'll get back to your previous message when I'm back home later this weekend. For now, I haven't observed the type of issue you are describing, but it mght just be that we need to modify a few things because of the version of programs you are using. What version of PowerPoint are you using? And what version of Windows? and 32 or 64bit?
    Also, what is the code you are using to get the arrow pointer?
     
Loading...

Share This Page