The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run macro in background (activate chrome window on keypress)
#1
I am sorry, this has been asked before but I couldn't find a clear explanation.

I have the following very simple code:

Macro chrome_refresher
Trigger CSF5     Help - how to add the trigger to the macro
Code:
Copy      Help
;/exe 2
int w=win("Chrome" "Chrome_WidgetWin_1")
act w

key F5          ;; F5

act


It is set to run when CTRL+SHIFT+F5 is pressed.
The code should run in the background and no matter in which application I am, when I press the key combination the code above is executed. (activating chrome window, send F5 key and then go back to previous window).

I mainly I will be using the code above when I am in one of my code editors: Webuilder, SublimeText or Notepad++.
But I might be using the macro from other programs (office, notepad, etc...) that's why I don't want to limit it to my editors but make this a 'global' macro.

Is it possible to keep the macro running in the background within windows?
The macro is called ""chrome_refresher", I would like to see it in my windows task manager running in the background as "chrome_refresher" when looking in the tab "Processes".

At the moment the macro runs briefly, with that I mean, the name "chrome_refresher" pops up briefly in my "Windows Task Manager" in the tab "Processes" but then closes/de-activates itself after a second.
I have set the option "Run in seperate process" in "Macro Properties" and UAC as "Administrator", but it still doesn't work.

I read in another topic, that I must make a function of the macro, but I didn't understand fully what to do after I make function the code.

(To avoid misunderstanding, I want to run the compiled .exe in the background)


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)