Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
catman
- Newbie
- Posts: 10
- Joined: Wed Oct 07, 2015 5:34 pm
Post
by catman » Thu Oct 15, 2015 3:06 pm
Does anybody know what a CF_RESULT_CODE of 32 means?\
Code: Select all
CopyFile>%SCRIPT_FILE%,i:\
MessageModal>CF_RESULT_CODE=%CF_RESULT_CODE%
// cf_result_code 32 is not described on the MSDN webpage referenced by the MS Help text:
// https://msdn.microsoft.com/en-us/library/windows/desktop/bb762164(v=vs.85).aspx
-
hagchr
- Automation Wizard
- Posts: 330
- Joined: Mon Jul 05, 2010 7:53 am
- Location: Stockholm, Sweden
Post
by hagchr » Thu Oct 15, 2015 3:14 pm
Hi, if I google it I get:
The process cannot access the file because it is being used by another process.
Not an expert on this so hopefully that helps or someone else has more information.
-
armsys
- Automation Wizard
- Posts: 1108
- Joined: Wed Dec 04, 2002 10:28 am
- Location: Hong Kong
Post
by armsys » Thu Oct 15, 2015 10:08 pm
The path in question contains read-only file(s).
Please try:
Code: Select all
CreateDir>i:\Temp
CopyFile>%SCRIPT_FILE%,i:\Temp
MDL>CF_RESULT_CODE
-
catman
- Newbie
- Posts: 10
- Joined: Wed Oct 07, 2015 5:34 pm
Post
by catman » Fri Oct 16, 2015 2:36 pm
This has really got me scratching my head ... your code segment created a TEMP directory, but the script file was not copied!
cf_result was 'true' but the cf_result_code was 2!
I'm going to investigate i:\ drive permissions in Windows file explorer (and get a headache in the process!).
-
hagchr
- Automation Wizard
- Posts: 330
- Joined: Mon Jul 05, 2010 7:53 am
- Location: Stockholm, Sweden
Post
by hagchr » Fri Oct 16, 2015 2:50 pm
You are trying to copy from SCRIPT_FILE which contains the path and name of the script you are running. Maybe locked when you run it. Have you tried copy a different file but same directories?
-
catman
- Newbie
- Posts: 10
- Joined: Wed Oct 07, 2015 5:34 pm
Post
by catman » Fri Oct 16, 2015 9:19 pm
Yeah, other CopyFile's work fine, with a result_code of 0.
You are probably right ... the 32 result_code must reflect the current script file being in use by MS.
I'd like for every macro to routinely copy itself onto a my major software drive that is regularly uploaded online but oh, well.
I can get by with [CopyFile>%USERDOCUMENTS_DIR%\Macro Scheduler 14\*.scp,i:\] in every macro, which successfully copies all except the currently open macro.