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
problem with windows key as trigger
#1
I have a macro that works fine with a key like F3 as the trigger. I want to use Wg (windows + g) as the trigger. If I use that trigger:
- the macro works fine if I put a delay of 0.2 at the top
- with a delay of 0.1 or no delay all sort of strange things happen:
  • * I'm logged of, have to enter my username to log in again
    * when I'm logged in the ease of access center dialog is showing, the narrator has been activated
    * the run-dialog from the start menu is open

All this does not happen if I use the Wg trigger with a simple macro that displays a message box.

I'm using windows 10, I have 'use low-level hook' checked.

The macro code is below, the purpose of the macro is, when a windows explorer window is active, to get the address of the folder it's showing, and show the same folder on my memory stick in the same explorer window (with the $Personal$ part omitted)

Macro memstick_show_same_dir
Trigger Wg     Help - how to add the trigger to the macro
Code:
Copy      Help
int memstickdrivenummer = try_findfile_on_drive2("x:\memstick.txt")
if memstickdrivenummer = 0  
,mes "memstick not found"
,end

int w=win("" "CabinetWClass")
str dirname.getwintext(id(1001 w)) ;;get text/name of address bar

if dirname.begi("address:")
,dirname.get(dirname 8)
dirname.trim

str mydocs.expandpath("$personal$")
if dirname.beg(mydocs)
,dirname.get(dirname,len(mydocs)+1)
,dirname.from("x:\" dirname)
dirname[0] = memstickdrivenummer

iff-(dirname)
,mes "Directory does not exist on memstick"
,,end
'Cl(dirname)Y  ;;activate address bar and type memstick path
0.05

act child("" "DirectUIHWND" w 0x0 "accName=Items View") ;;list 'Items View'

(The try_findfile_on_drive2 gets the driveletter of the memorystick)

Can anybody tell me what the problem is?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)