How to delete a page in Windows Journal?

Discussion in 'Software' started by FinancialWar, Apr 17, 2016.

  1. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,188
    Likes Received:
    238
    Trophy Points:
    81
    Well, I'd hate to sound like a broken record but you can easily do it (i.e., assign a hotkey that you could trigger with Orbweaver) with Autohotkey...
     
  2. FinancialWar

    FinancialWar Scribbler - Standard Member

    Messages:
    107
    Likes Received:
    2
    Trophy Points:
    31
    How can you assign to AHK to trigger when there is no keyboard command or in the menu?
     
  3. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,188
    Likes Received:
    238
    Trophy Points:
    81
    You can use AHK for a bunch of things other than just sending keyboard shortcuts. In the context of your question, I see two ways in which AHK can be used to change the zoom:

    - Try the following: put the cursor in the zoom box and press the up and down arrows (or even scroll the wheel) and this will cycle through the list of predefined zoom levels. You can do the same with AHK: AHK can detect the zoom box and you can just set a hotkey to send up/down keys to the zoom box.

    - AHK can also read the value in the zoom box. So you could set a hotkey to read the value, add any increment you want, then paste the new value back into the zoom box. This way you can use any zoom level, not just the predefined ones.​

    Just let me know if you want to explore this further (in which case you would have to install AHK on your computer, from here: https://autohotkey.com/).
     
  4. FinancialWar

    FinancialWar Scribbler - Standard Member

    Messages:
    107
    Likes Received:
    2
    Trophy Points:
    31
    I have autohotkey installed now.

    Can you tell me what script to write?

    Since Ctrl++ and Ctrl+- does not work in Journal, let's assign these two command to zoom in and zoom out.
     
  5. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,188
    Likes Received:
    238
    Trophy Points:
    81
    Create a new .ahk file by right-clicking on your desktop/folder, and selecting New -> AutoHotkey Script. Name it whatever you want as long as it has the .ahk extension. Then open the file in a text editor such as Notepad, and replace the existing text with what's below. Save and double-click on the file to launch it (you should see a green icon in your system tray, on which you can right-click to quit the script.)

    Code:
    #SingleInstance, force
    Setbatchlines, -1
    
    #IfWinActive ahk_class JournalApp
    
    ^=::
    ControlSend, Edit2, {Up}, ahk_class JournalApp
    Return
    
    ^-::
    ControlSend, Edit2, {Down}, ahk_class JournalApp
    Return
    
    F2::
    ControlgetText, ZoomLevel, Edit2, ahk_class JournalApp
    StringTrimRight, ZoomLevel,ZoomLevel,1
    New_Zoom := ZoomLevel + 2
    ControlsetText, Edit2, %New_Zoom%, ahk_class JournalApp
    ControlSend, Edit2, {Enter}, ahk_class JournalApp
    Return
    
    F3::
    ControlgetText, ZoomLevel, Edit2, ahk_class JournalApp
    StringTrimRight, ZoomLevel,ZoomLevel,1
    New_Zoom := ZoomLevel - 2
    ControlsetText, Edit2, %New_Zoom%, ahk_class JournalApp
    ControlSend, Edit2, {Enter}, ahk_class JournalApp
    Return
    
    Explanations:
    The first two lines make sure it runs at max efficiency. The next line makes it that the remaps are only effective in Journal (i.e., it won't overtake Ctrl + - in other applications). Then are the codes for Ctrl + = and Ctrl + - (note that in AHK language, Ctrl is symbolized by ^). For your testing, I also included a remap for F2 and F3 that you can do whatver you want with. The way it's set, Ctrl + =/- will send up/down to the zoom box (so they cycle through the available values), whereas F2 and F3 increase/decrease the zoom value by increments of 2.

    Let me know if it doesn't work or if you need more help!
     
    FinancialWar likes this.
  6. FinancialWar

    FinancialWar Scribbler - Standard Member

    Messages:
    107
    Likes Received:
    2
    Trophy Points:
    31
    Wow Holy Sweet Mother Jesus! Worked like a charm!

    How long did you learn to code like that?!

    Damn I need to learn AHK!

    Do you have a paypal account? I'd like to buy you a beer!
     
  7. lblb

    lblb Scribbler - Standard Member Senior Member

    Messages:
    1,188
    Likes Received:
    238
    Trophy Points:
    81
    Indeed, AHK is pretty cool! It's especially useful to automate things in Windows even if you have very little programming knowledge or experience (which is where I started a couple of years ago). Beyond hotkeys, remaps and shortcuts, it can be used for all kinds of stuff. At various places on this forum I've used it to create onscreen toolbars, toggle touch input on off, move the taskbar, rotate the screen, perform online searches, batch rename files, change the screen brightness, change power plans...

    Now that you have your AHK script going, you could try to set a hotkey for the menu command that I showed you earlier! It would accomplish the same as your previous Alt+ X shortcuts, but would do it without having the menu show up.

    Have fun with it!
     

Share This Page