Search found 1009 matches

by Grovkillen
Wed Jan 17, 2024 5:11 pm
Forum: Scripts and Tips
Topic: Only run script when pc is locked (lock screen)
Replies: 2
Views: 1664

Only run script when pc is locked (lock screen)

Here's a proof of concept to have a script run only when the pc is locked. I just look for the process "LogonUI.exe" which is the lock screen. If it's running then the pc is locked. I hope it's help someone. OnEvent>CUSTOM,LOOP_TO_CHECK_IF_LOCKED_WORKSTATION,LOGONUI_IS_ACTIVE,RUN_THIS_ONLY_WHEN_SCRE...
by Grovkillen
Tue Jan 16, 2024 12:26 pm
Forum: Enhancement Suggestions
Topic: [added 15.0.23] Run command, capture STDOUT
Replies: 29
Views: 72767

Re: [added 15.0.23] Run command, capture STDOUT

Nothing is shared. There shouldn't be a clash. Today the clash happened. A compile script crashed and was started up again. The crash happened during the run command and thus the " output.tmp " file was created in the ...AppData\Local\Temp folder. When the newly started script tried to do a RP_STDO...
by Grovkillen
Wed Jan 10, 2024 6:50 am
Forum: Scripts and Tips
Topic: Random Serial Code Generator
Replies: 6
Views: 9680

Re: Random Serial Code Generator

Thanks Marcus for this code snippet! Came really handy today.
by Grovkillen
Tue Jan 09, 2024 1:24 pm
Forum: Technical / Scripting
Topic: VirtualKey for Gamepad/Joystick input
Replies: 10
Views: 5556

Re: VirtualKey for Gamepad/Joystick input

Great little code there. Thanks for that! :)

But, the gamepad isn't triggering anything so I guess that the gamepad isn't acting like a normal input after all. Would you consider looking into this and see if it's possible to add this feature to MS? :oops:
by Grovkillen
Tue Jan 09, 2024 11:33 am
Forum: Technical / Scripting
Topic: VirtualKey for Gamepad/Joystick input
Replies: 10
Views: 5556

Re: VirtualKey for Gamepad/Joystick input

I guess it wasn't that easy... this is not working: //button A = 195 OnEvent>KEY_DOWN,VK195,0,TEST Label>START Wait>1 Goto>START SRT>TEST MDL>195 GamepadA - pressed Exit> END>TEST I found some more info here: https://learn.microsoft.com/sv-se/windows/win32/api/xinput/ns-xinput-xinput_gamepad?redirec...
by Grovkillen
Tue Jan 09, 2024 9:52 am
Forum: Technical / Scripting
Topic: VirtualKey for Gamepad/Joystick input
Replies: 10
Views: 5556

Re: VirtualKey for Gamepad/Joystick input

If we look in the help: https://help.mjtnet.com/article/262-virtual-key-codes we see that these VK codes are reserved: 195 GamepadA 196 GamepadB 197 GamepadX 198 GamepadY 199 GamepadRightShoulder 200 GamepadLeftShoulder 201 GamepadLeftTrigger 202 GamepadRightTrigger 203 GamepadDPadUp 204 GamepadDPad...
by Grovkillen
Tue Jan 09, 2024 9:36 am
Forum: Technical / Scripting
Topic: VirtualKey for Gamepad/Joystick input
Replies: 10
Views: 5556

VirtualKey for Gamepad/Joystick input

I'm trying to make an "extra" keyboard for our workshop users so that they can make inputs using their feet. For this I plan to use a gamepad DIY module (usually made to build arcade machines). I just need to find a way to use the input from joystick. https://learn.microsoft.com/en-us/uwp/api/window...
by Grovkillen
Mon Dec 18, 2023 12:22 pm
Forum: General Discussion
Topic: ONERROR not capturing string error
Replies: 6
Views: 10421

Re: ONERROR not capturing string error

Thanks for the feedback.

Currently I'm using the good 'ol:

Code: Select all

Let>TEMP_check=VALUE*0
If>TEMP_check=0
  Let>VALUE_round={Round(%VALUE%)}
Else>
  Gosub>PROCESS_ERROR
Endif>
by Grovkillen
Mon Dec 18, 2023 8:23 am
Forum: General Discussion
Topic: ONERROR not capturing string error
Replies: 6
Views: 10421

ONERROR not capturing string error

I have many times found myself with end user problems that have been related to some string ending up in a numerical calculation. These errors aren't catched by the ONERROR function. See example below, the commended out line will be catched but not the string inside the calculation error. Let>ONERRO...
by Grovkillen
Wed Dec 13, 2023 11:47 am
Forum: Scripts and Tips
Topic: To get the number of physical monitors
Replies: 4
Views: 23210

Re: To get the number of physical monitors

A touch up on the code: Let>RP_CAPTURESTDOUT=1 Let>POWERSHELL_COMMAND=Add-Type -AssemblyName System.Windows.Forms;[System.Windows.Forms.Screen]::AllScreens | ConvertTo-Json RunProgram>cmd /c PowerShell -Command " & {%POWERSHELL_COMMAND%}" JSONParse>RP_STDOUT,$[*].DeviceName,TEMP_device_name JSONPars...
by Grovkillen
Mon Dec 11, 2023 1:47 pm
Forum: Technical / Scripting
Topic: Time since last user input
Replies: 5
Views: 7848

Re: Time since last user input

A vbscript based code snippet. I use the IO read of the csrss.exe process. There's multiple sessions open but for me the second seems to be my users input. VBSTART Function IdleComputer() On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"...
by Grovkillen
Fri Oct 20, 2023 1:46 pm
Forum: Scripts and Tips
Topic: Mouse Movement Detect via Custom OnEvent>
Replies: 1
Views: 11099

Re: Mouse Movement Detect via Custom OnEvent>

Ah, nice approach! I will think about it and maybe add a "gesture recognizer" to it. I have some idea of doing it by making some orthogonal calculations and store the vectors as an array and based on the series of vectors I could interpret a gesture.
by Grovkillen
Sat Oct 14, 2023 4:23 pm
Forum: Technical / Scripting
Topic: Memory leak when using PyExec
Replies: 7
Views: 20070

Re: Memory leak when using PyExec

Yes sure! The thing is though... You need to use a database to pass the data back to the main process. Or find another way, if you do please tell me how you did it. The idea is to compile the script to an executable and from the main process you then start "yourself" but pass a variable from the com...
by Grovkillen
Thu Oct 12, 2023 5:12 pm
Forum: General Discussion
Topic: Putting macro scheduler into a stand alone client?
Replies: 7
Views: 15845

Re: Putting macro scheduler into a stand alone client?

Ok, then maybe the use of a mouse click is needed. I was hoping it be a native windows or HTML/browser based app.
by Grovkillen
Thu Oct 12, 2023 4:35 pm
Forum: General Discussion
Topic: Putting macro scheduler into a stand alone client?
Replies: 7
Views: 15845

Re: Putting macro scheduler into a stand alone client?

And they need to be clicked? The image I mean... Or could it be programmatically "clicked" instead of using the mouse?
Sign up to our newsletter for free automation tips, tricks & discounts