ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Find And Run Robot

Open alias/group in notepad++

<< < (2/2)

You can already send FARR a windows message (or is it commandline call) to make it RELOAD its aliases after you have changed them outside of FARR.. Let me look it up and tell you how to do that..
-mouser (January 09, 2019, 09:46 AM)
--- End quote ---
I'm all ears about windows messages for FARR, haven't tried that method. Before using the exit-edit-start method I tried editing while FARR was running and then sending the special string "goareload" to the FARR editbox , but that it isn't silent (FARR must be open and FARR also forces the special string agroups afterwards) and cannot handle enabling/disabling aliases I think since FARR will override the disabled/enabled change from memory or .ini. Previous thread on that here

I can't tell if being able to quickly edit an alias file without having to go to options alias page is the part that's important to you..-mouser (January 09, 2019, 09:46 AM)
--- End quote ---
That's exactly what I'm looking for, a way to edit aliases in Notepad++ without having to go through options windows. And of course have FARR reload edited aliases.

a way to edit aliases in Notepad++ without having to go through options windows. And of course have FARR reload edited aliases.
-ahkscript (January 09, 2019, 10:17 PM)
--- End quote ---

Ok, here is a quick fix to do that.
Caveats: you'll have to manually edit xml formatted data and you won't be able to disable/enable aliases but can edit/create/remove.

Step 1: create a new FARR alias
Change "<username>" and perhaps the path strings below to match those on your PC

name: notepad++ myaliases edit
regex: ^ali$
edit aliases in notepad++ | C:\Program Files (x86)\Notepad++\notepad++.exe C:\Users\<username>\Documents\DonationCoder\FindAndRunRobot\AliasGroups\MyCustom\myaliases.alias

Step 2: make this AutoHotkey helper script start with Windows
When control+s is pressed in Notepad++ and the active file is named myaliases.alias and FindAndRunRobot.exe is running then the script exits FARR, performs the save and then restarts FARR. In all other cases control+s should perform a normal save in Notepad++.

--- Code: Autohotkey ---#NoEnvSendMode InputSetWorkingDir %A_ScriptDir%#SingleInstance force ;farr_notepad++_helper_script farr := "C:\Program Files (x86)\FindAndRunRobot\FindAndRunRobot.exe" #IfWinActive ahk_exe notepad++.exe^s::WinGetActiveTitle, win_titleif RegExMatch(win_title, "^.+\myaliases.alias - Notepad..$") and processExist("FindAndRunRobot.exe"){  ;if notepad++ active tab is myaliases.alias and FARR process exist  ;then exit FARR, apply save, silently restart FARR  RunWait "%farr%" -exit  send ^s  sleep 100  Run "%farr%" -hide}else  send ^sreturn#IfWinActive ;function: check if process existsprocessExist(process_name){  process,exist,% process_name  return errorLevel ;PID or 0}
Create a backup of your myaliases.alias before testing this in case you or the script unexpectedly mess upp the file.

An alternative to the always running hotkey script in step 2 is to create another FARR alias that only temporarily runs a script with the same exit save restart steps if the last active window before FARR was notepad++ with myaliases.alias open. In this alternative you'd instead of control+s use a FARR alias to initiate the save.


[0] Message Index

[*] Previous page

Go to full version