Strange Problem with a file

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Strange Problem with a file

Post by mightycpa » Sat Mar 13, 2021 10:33 pm

I'm running MS15 on Windows Server 2008R2.

I have a script that tries to read the file, but it can't. It returns ##NO FILE## when it tries to read it.

I created a small test script to see what the problem was and it's very strange:
I'm logged in as Administrator
The file exists and the path is right
The variable I'm using is defined correctly.
File sharing is with Everyone, full rights
But:
ReadLn can't find it.
GFL can't read the folder
but strangely enough, ExecuteFile> can run it.
Here's the script:

Code: Select all


Let>IGNOREERRORS=1

MouseMove>781,513
LClick
Wait>1
SetFocus>Administrator:
Wait>2
Send>Whoami
Wait>1
Press Enter
//MessageModal>look
Let>v_varfile=c:\ms15\chess\tempvar\test_file.txt
Let>v_txt_cnt=1
  Let>v_txt_cnt=%v_txt_cnt%+1
  ReadLn>v_varfile,v_rezult,v_text_info
  MessageModal>%v_varfile% says %v_text_info%
GetFileList>c:\ms15\chess,v_res
MessageModal>v_res
ExecuteFile>%v_varfile%
and here, you can watch it happen:

https://app.vidjack.com/share/1944

I try to walk you through what I'm doing, but it helps to use the pause button so you can study the action.

Also, my other scripts can use ReadLn in this folder on other text files, no problem. I don't know what might be different, but if anybody can spot something, I'd be grateful.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Strange Problem with a file

Post by mightycpa » Sun Mar 14, 2021 5:06 pm

I've switched over to reading/writing via database, so the error is no longer critical.

But I'm still interested in an answer.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Strange Problem with a file

Post by Marcus Tettmar » Mon Mar 15, 2021 1:51 pm

What happens if you run Macro Scheduler as administrator? Being logged in as Administrator is not enough - Macro Scheduler still runs by default with ordinary user privileges. Exit Macro Scheduler fully (File/Exit) or right click system tray icon and exit. Then right click on Macro Scheduler shortcut and run as admin.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Strange Problem with a file

Post by mightycpa » Wed Mar 17, 2021 1:56 am

Marcus, I'll give that a whirl after I wrap up these other items. Maybe Wednesday, most likely Thursday.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts