Save As doesn't seem to function on a disconnected server

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Taudruw
Newbie
Posts: 4
Joined: Fri Nov 19, 2010 9:21 pm

Save As doesn't seem to function on a disconnected server

Post by Taudruw » Fri Nov 19, 2010 9:33 pm

Hello. First post so I figured I'd try the Beginner section. I tried to search on this but came up empty so if it has been discussed please let me know where.

I am attempting to login to a website and download a simple CSV file. I used Webrecorder to get my initial script written then I tweaked it to fix any issues. Now I have it setup on my scheduler which resides on a Windows 2003 server. It runs fine when I watch it manually, however when I schedule it, disconnect my RDP session and let it run on it's own it seems to get stuck on the SendText>S or somewhere near that point. I've tried Send>S and SendText>S and they both seem to halt the script or it is halting right before that point. Any ideas or has anyone else run into this problem? Thanks in advance.

----------------------------

// Generated by MacroScript WebRecorder 2.3
// Recorded on Friday, November 19, 2010, at 10:16 AM

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1
IE_Create>0,IE[0]

IE_Navigate>%IE[0]%,https://crm.bcdtravel.com/psc/crmprod_2 ... SMAXBO_1,r
IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"login"}
Let>FieldName={"userid"}
Let>FieldValue={"*******"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"login"}
Let>FieldName={"pwd"}
Let>FieldValue={"**********"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"login"}
Let>TagValue={"Submit"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r

IE_Wait>%IE[0]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"login"}
Let>TagValue={"CSV Text File"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

Wait>1
Wait>1
Wait>1

WaitWindowOpen>File Download
SetFocus>File Download

Wait>1
Wait>1
Wait>1

//FILE DOWNLOAD - YOU MAY NEED TO MODIFY THIS PART
//MODIFY FILE PATH AND NAME HERE:
Let>filename=\\GTSCKC35\JMYER02\TT\TTFILE
Wait>1
SetFocus>File Download

Wait>1
Wait>1
Wait>1

SendText>S

Wait>1
Wait>1
Wait>1

WaitWindowOpen>Save As
SetFocus>Save As

Wait>1
Wait>1
Wait>1

Send>filename

Wait>1
Wait>1
Wait>1

Press Enter
Wait>1
Wait>1
WaitWindowClosed>Save As
Wait>1
Wait>1

IfWindowOpen>%filename%*
CloseWindow>%filename%*
endif

Wait>1
Wait>1

Press Enter

Wait>1
Wait>1

IfWindowOpen>https://crm.bcdtravel.com/psc/crmprod_2 ... BCD_CDSMAX - Windows Internet Explorer
CloseWindow>https://crm.bcdtravel.com/psc/crmprod_2 ... BCD_CDSMAX - Windows Internet Explorer
endif

Press ALT
SendText>F
Release ALT
SendText>X


Label>end_script
Justin Myers

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Fri Nov 19, 2010 9:43 pm

disconnect my RDP session
This has been discussed before.....


The non-technical answer is that when RDP is disconnected or minimized, there is basically NO screen for the program to interact with. This is the way Microsoft chose to do it, not really a MacroScheduler issue.


Try the suggestions mentioned at the bottom of this thread:
http://www.mjtnet.com/forum/viewtopic.p ... hlight=rdp

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