Save as window
Moderators: JRL, Dorian (MJT support)
Save as window
Is it possible to access the "Save as" window through MS scheduler and have it appear?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Which Save As window? On another application? You want to automate another application to invoke the Save As window? Yes, if that's what you want to do it is possible.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I am using Macro Scheduler with a dialog to create a CNC programs for our machine tools. I am using the WriteLn> function to create each line and then executing the file to open it in notepad.
What I woud like to do is to give the user to option to save as a different part number without writing over the top of the one that already exists.
What I woud like to do is to give the user to option to save as a different part number without writing over the top of the one that already exists.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
To invoke the Save As box in Notepad just do:
SetFocus>Notepad*
Press ALT
Send>fa
Release ALT
WaitWindowOpen>Save As
Have you read the "Scripting Windows for Beginners" guide in the help file which takes you through a Notepad example?
SetFocus>Notepad*
Press ALT
Send>fa
Release ALT
WaitWindowOpen>Save As
Have you read the "Scripting Windows for Beginners" guide in the help file which takes you through a Notepad example?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Maybe I am going about this in the wrong order. What I am trying to do is to create the file before opening it in notepad. I have it checking to see if the file exists and if it does, this is where I would like to give the option of replacing or save as new it before it just gets replaced. Also if I could get the Save as dialog window to open before creating the file it would allow the user to place the file in another directory.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You want to open Notepad's Save As window before opening Notepad !? Wow, I'd like to see that. You got a magic wand?
Erm, I think what you might really be saying is you want a way to prompt the user IF the file already exists, and ask the user whether to overwrite or provide a new file name ... before doing anything else. Am I right? If so, something like:
IfFileExists>filename
Ask>File Exists, Shall I Overwrite?,answer
If>answer=NO
Input>filename,Enter New Filename
Endif
Endif
That uses a simple YES/NO box and then IF the user says NO to the overwrite prompt it uses an Input box to request the new filename.
Alternatively you could use the dialog designer to build your own custom dialog which can be made to look the way you want.
Does this help?
Erm, I think what you might really be saying is you want a way to prompt the user IF the file already exists, and ask the user whether to overwrite or provide a new file name ... before doing anything else. Am I right? If so, something like:
IfFileExists>filename
Ask>File Exists, Shall I Overwrite?,answer
If>answer=NO
Input>filename,Enter New Filename
Endif
Endif
That uses a simple YES/NO box and then IF the user says NO to the overwrite prompt it uses an Input box to request the new filename.
Alternatively you could use the dialog designer to build your own custom dialog which can be made to look the way you want.
Does this help?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
They're not in the designer because there is no way to graphically create them. But there are examples in the help file and here on the forum. You add them to the code in the Dialog block. Here's a simple example:
Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=211
Left=103
Button=Browse,152,48,75,25,0
Edit=FileEdit,112,80,121,msEdit1
FileBrowse=Browse,FileEdit
MainMenu=File,Open(10),Save(20),Exit(30)
MainMenu=Edit,Copy(40),Cut(50),Paste(60)
MainMenu=Help,About(70)
EndDialog>Dialog1
Show>Dialog1,r
Dialog>Dialog1
Caption=Dialog1
Width=445
Height=250
Top=211
Left=103
Button=Browse,152,48,75,25,0
Edit=FileEdit,112,80,121,msEdit1
FileBrowse=Browse,FileEdit
MainMenu=File,Open(10),Save(20),Exit(30)
MainMenu=Edit,Copy(40),Cut(50),Paste(60)
MainMenu=Help,About(70)
EndDialog>Dialog1
Show>Dialog1,r
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?