Search found 517 matches

by Grovkillen
Thu Dec 03, 2020 5:45 pm
Forum: General Discussion
Topic: how can I debug script called by macro>
Replies: 3
Views: 4854

Re: how can I debug script called by macro>

I use include for this reason, the code in the included file will be shown in the editor when you run your code.
by Grovkillen
Thu Dec 03, 2020 10:15 am
Forum: Technical / Scripting
Topic: Rename file
Replies: 2
Views: 20

Re: Rename file

Well, I asked for rename... here's the rename variant:

Code: Select all

/*
python_code_rename_file:
import os
os.rename(r'%PY_RENAME_FILE_SOURCE%',r'%PY_RENAME_FILE_TARGET%')
*/
LabelToVar>python_code_rename_file,py_rename_file
PyExec>py_rename_file,temp
by Grovkillen
Thu Dec 03, 2020 10:06 am
Forum: Technical / Scripting
Topic: Rename file
Replies: 2
Views: 20

Re: Rename file

Found a solution. Using Python:

Code: Select all

/*
python_code_copy_file:
import shutil
source = r'%PY_COPY_FILE_SOURCE%'
target = r'%PY_COPY_FILE_TARGET%'
shutil.copyfile(source, target)
*/
LabelToVar>python_code_copy_file,py_copy_file
PyExec>py_copy_file,temp
by Grovkillen
Wed Dec 02, 2020 3:02 pm
Forum: Technical / Scripting
Topic: Time since last user input
Replies: 1
Views: 28

Re: Time since last user input

I managed to get it working using Python. MS is such a bad*ss tool :) /* python_code: import ctypes, ctypes.wintypes class LASTINPUTINFO(ctypes.Structure): _fields_ = [ ('cbSize', ctypes.wintypes.UINT), ('dwTime', ctypes.wintypes.DWORD), ] PLASTINPUTINFO = ctypes.POINTER(LASTINPUTINFO) liinfo = LAST...
by Grovkillen
Wed Dec 02, 2020 12:54 pm
Forum: Scripts and Tips
Topic: Get target path or file of a shortcut file (.lnk)
Replies: 0
Views: 20

Get target path or file of a shortcut file (.lnk)

Let>SHORTCUT_FILE=C:\...\<file>.lnk VBSTART Function GetTargetFile(LinkFile) Set WShell = CreateObject("WScript.Shell") Set objShortcut = WShell.CreateShortcut(LinkFile) GetTargetFile = objShortcut.TargetPath End Function VBEND VBEval>GetTargetFile("%SHORTCUT_FILE%"),TARGET_FILE Trick found here: h...
by Grovkillen
Wed Dec 02, 2020 11:26 am
Forum: Technical / Scripting
Topic: Time since last user input
Replies: 1
Views: 28

Time since last user input

I would like my server scripts to pause/resumed based on last user interaction/input. I found this but how do I define the size of the structure?

https://docs.microsoft.com/en-us/window ... tinputinfo
by Grovkillen
Wed Dec 02, 2020 11:25 am
Forum: Enhancement Suggestions
Topic: Get mouse history
Replies: 0
Views: 15

Get mouse history

Would it be possible to implement this: https://docs.microsoft.com/en-us/window ... vepointsex

I'd like to use it to track mouse gestures which could be used to trigger scripts.
by Grovkillen
Wed Dec 02, 2020 10:56 am
Forum: Enhancement Suggestions
Topic: Run command, capture STDOUT
Replies: 0
Views: 8

Run command, capture STDOUT

It would be really great if we could capture the STDOUT from a run command instead of having to rely on piping it to the clipboard or an external file. Something like this: Let>RP_CAPTURE_STDOUT=1 RunProgram>wmic path Win32_OperatingSystem get LastBootUpTime //RP_STDOUT=20201202082216.500000+060 Thi...
by Grovkillen
Wed Dec 02, 2020 9:19 am
Forum: Technical / Scripting
Topic: Rename file
Replies: 2
Views: 20

Rename file

If I have a fairly long file path and would like to rename it I get the "max path" error (CF_RESULT_CODE=183). How should I go about this?
by Grovkillen
Wed Dec 02, 2020 8:32 am
Forum: Enhancement Suggestions
Topic: CopyFile documentation
Replies: 1
Views: 16

CopyFile documentation

I ran into a problem when the copy file command returned CF_RESULT=True which is a success according to the help (https://www.mjtnet.com/manuals/v15/HTML/copyfile.html), no file was copied. The CF_RESULT_CODE was equal to 183 (0xB7) which told me that the MAX_PATH was exceeded. I think this should b...
by Grovkillen
Sun Nov 22, 2020 3:01 am
Forum: Technical / Scripting
Topic: Parsing bug when having comments and/or nested IF's?
Replies: 6
Views: 193

Re: Parsing bug when having comments and/or nested IF's?

Ok, yes the # is there just as a test.
by Grovkillen
Tue Nov 17, 2020 2:33 pm
Forum: Technical / Scripting
Topic: Parsing bug when having comments and/or nested IF's?
Replies: 6
Views: 193

Re: Parsing bug when having comments and/or nested IF's?

Thanks for the update. My machine still "misbehave" with this but I've made a work around so it's no sweat.
by Grovkillen
Tue Nov 17, 2020 9:44 am
Forum: Technical / Scripting
Topic: Parsing bug when having comments and/or nested IF's?
Replies: 6
Views: 193

Parsing bug when having comments and/or nested IF's?

This is part of a bigger script but I want to show what appears to be a bug. Please look at the linked GIF. https://i.ibb.co/PYHQCTP/animation.gif I demonstrate the issue with this code. Let>DO_SOMETHING_WITH_THE_FILE_Var_1=.xls# UpperCase>DO_SOMETHING_WITH_THE_FILE_Var_1,DO_SOMETHING_WITH_THE_FILE_...
Sign up to our newsletter for free automation tips, tricks & discounts