Jump to content
Macro Express Forums

Save Notepad In Text Processing


m204prgmr

Recommended Posts

It has been awhile and I'm rusty. I'm trying to save Notepad that I've opened and written to and can't seem to connect the dots. Can someone help? thanks

 

<BTFBEG:005:000001:000000:C:\Documents and Settings\RGHutchinson\Desktop\AnnArbornames.txt><LAUNCHDEL2:0:01C:\WINDOWS\system32\notepad.exe><IVAR2:01:02:FEnter the numberFFCenter:Center><SPKEY:0100><TEXTTYPE:<ALTD>F<ALTU>><TEXTTYPE:A><TEXTTYPE:C:\PT2OKX0%N%.txt<ENTER>><DELAY:10><DIS:<TVAR2:05:02:FEnter the outfile nameFFCenter:Center><TEXTTYPE://PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER>><TEXTTYPE://STEPNAME EXEC PGM=FTP<ENTER>><TEXTTYPE://*%OPC SCAN<ENTER>><TEXTTYPE://SYSPRINT DD SYSOUT=*<ENTER>><TEXTTYPE://OUTPUT DD SYSOUT=*<ENTER>><TEXTTYPE://INPUT DD * <ENTER>><TEXTTYPE:XXX.29.XX.64 5565<ENTER>><TEXTTYPE:FTISTSC TISTSC <ENTER>><TEXTTYPE: <ENTER>><TEXTTYPE:put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER>><TEXTTYPE:quit<ENTER>><TEXTTYPE://*<ENTER>><BTFEND>

Link to comment
Share on other sites

I'm not sure what you're trying to accomplish but at first glance I think you need to move the launching of notepad above the Text File Begin Process loop.

 

One other thing that I noticed is you are using uppercase letters in your text type commands that open the file. Some programs don't work as well with uppercase letters as with lower case letters.

 

I also think you may need a slight delay after the Alt-f and another one after the a.

And lastly, I do not see where you are saving the file (and possibly closing it) after your Text Type commands.

 

This is what you have:

Text File Begin Process: "AnnArbornames.txt"
 Program Launch: "notepad.exe"
 Variable Set Integer %N1% from Prompt
 Keystroke Speed: 100 Milliseconds
 Text Type: <ALTD>F<ALTU>
 Text Type: A
 Text Type: C:\PT2OKX0%N%.txt<ENTER>
 Delay 10 Seconds
 Variable Set String %T5% from Prompt
 Text Type: //PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER>
 Text Type: //STEPNAME EXEC PGM=FTP<ENTER>
 Text Type: //*%OPC SCAN<ENTER>
 Text Type: //SYSPRINT DD SYSOUT=*<ENTER>
 Text Type: //OUTPUT DD SYSOUT=*<ENTER>
 Text Type: //INPUT DD * <ENTER>
 Text Type: XXX.29.XX.64 5565<ENTER>
 Text Type: FTISTSC TISTSC <ENTER>
 Text Type:  <ENTER>
 Text Type: put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER>
 Text Type: quit<ENTER>
 Text Type: //*<ENTER>
Text File End Process

You might want to try something like this:

Launch and Activate: "notepad.exe"
Delay 1 Seconds
Text File Begin Process: "AnnArbornames.txt"
 If Not Window Title "Notepad" on top
   Activate Window: "Notepad"
 End If
 Variable Set Integer %N1% from Prompt
 Keystroke Speed: 100 Milliseconds
 Text Type: <ALTD>f<ALTU>
 Delay 0.1 Seconds
 Text Type: a
 Delay 0.1 Seconds
 Text Type: C:\PT2OKX0%N%.txt<ENTER>
 Delay 10 Seconds
 Variable Set String %T5% from Prompt
 Text Type: //PT2MTX0%N1% JOB ,'PT2MT FTP'<ENTER>
 Text Type: //STEPNAME EXEC PGM=FTP<ENTER>
 Text Type: //*%OPC SCAN<ENTER>
 Text Type: //SYSPRINT DD SYSOUT=*<ENTER>
 Text Type: //OUTPUT DD SYSOUT=*<ENTER>
 Text Type: //INPUT DD * <ENTER>
 Text Type: XXX.29.XX.64 5565<ENTER>
 Text Type: FTISTSC TISTSC <ENTER>
 Text Type:  <ENTER>
 Text Type: put 'PT2MT.OUT.%T5%' PT2MT.OUT.%T5% <ENTER>
 Text Type: quit<ENTER>
 Text Type: //*<ENTER>
 Text Type: <CTRLD>s<CTRLU>
 Wait for File Ready: "PT2OKX0%N%.txt"
 Delay 0.1 Seconds
Text File End Process

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...