Search found 1030 matches

by Grovkillen
Wed Dec 13, 2023 11:47 am
Forum: Scripts and Tips
Topic: To get the number of physical monitors
Replies: 4
Views: 26298

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: 9538

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: 12673

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: 21973

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: 17682

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: 17682

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?
by Grovkillen
Thu Oct 12, 2023 2:41 pm
Forum: General Discussion
Topic: Putting macro scheduler into a stand alone client?
Replies: 7
Views: 17682

Re: Putting macro scheduler into a stand alone client?

Yes it's possible to do what you're asking. The only way to know how to do it is to start coding it. We'll help you along the way.
by Grovkillen
Sat Oct 07, 2023 5:11 am
Forum: Scripts and Tips
Topic: Exit editor from within code
Replies: 2
Views: 35963

Re: Exit editor from within code

Yes I'm not using the MS "launcher".
by Grovkillen
Mon Oct 02, 2023 6:34 am
Forum: Scripts and Tips
Topic: Exit editor from within code
Replies: 2
Views: 35963

Exit editor from within code

If you want to close the editor after the script ends (for whatever reason) you can do this using PyExec:

Code: Select all

PyExec>import sys%CRLF%sys.exit(),,
by Grovkillen
Wed Sep 27, 2023 3:34 pm
Forum: Technical / Scripting
Topic: Memory leak when using PyExec
Replies: 7
Views: 21973

Re: Memory leak when using PyExec

JRL, thanks for the feedback. I understand how you see it.

In my current project I have now made the python code run as sub processes.
by Grovkillen
Wed Sep 27, 2023 10:15 am
Forum: Technical / Scripting
Topic: Memory leak when using PyExec
Replies: 7
Views: 21973

Re: Memory leak when using PyExec

All right, then my roadmap is to convert these executions of python code as sub-processes that will exit them selves and thus not crash. Thanks for the feedback!
by Grovkillen
Wed Sep 27, 2023 5:09 am
Forum: Technical / Scripting
Topic: Memory leak when using PyExec
Replies: 7
Views: 21973

Re: Memory leak when using PyExec

I have a feeling that MS is starting a new instance of the Python code each PyExec. The memory allocation is increasing at a fairly linear pace and rate. Change the Wait>1 to Wait>0.01 and it will crash within a minute.
by Grovkillen
Tue Sep 26, 2023 3:30 pm
Forum: Technical / Scripting
Topic: Memory leak when using PyExec
Replies: 7
Views: 21973

Memory leak when using PyExec

Run this script AS COMPILED and observe the process memory usage. It will grow rapidly until it crashes. Label>START_OF_SCRIPT //format=1 PYExec>import datetime%CRLF%print(datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")),ISO_8601_format_1 //format=2 PYExec>import datetime%CRLF%print(dateti...
Sign up to our newsletter for free automation tips, tricks & discounts