Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Stats

macrumors newbie
Original poster
Sep 23, 2008
5
0
Florida
«event miscdosc» "DIRECTORY(\"Macintosh HD:Microsoft Office X:Templates:My Templates\")"

what is this -do

code says window1 can I use its name instead
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
«event miscdosc» "DIRECTORY(\"Macintosh HD:Microsoft Office X:Templates:My Templates\")"

what is this -do

code says window1 can I use its name instead

Erm, whatever you tried to do didn't work. Try opening the script and pasting the text...
 

Stats

macrumors newbie
Original poster
Sep 23, 2008
5
0
Florida
Erm, whatever you tried to do didn't work. Try opening the script and pasting the text...

tell application "Microsoft Excel"
Activate
«event miscdosc» "DIRECTORY(\"Macintosh HD:Microsoft Office X:Templates:My Templates\")"
Select Range "R1C1:R1C2"
Save ActiveWorkbook In "Macintosh HD:Microsoft Office X:Templates:My Templates:t test of Means" As xlNormal Password "" WriteReservedPassword "" without ReadOnlyRecommended and CreateBackup
Close ActiveWindow
 

Stats

macrumors newbie
Original poster
Sep 23, 2008
5
0
Florida
Erm, I don't see window1 in that anywhere...

tell application "Finder"
activate
select Finder window 1
select Finder window 1
set target of Finder window 1 to folder "Hypotheses Section" of folder "MOS Templates" of disk "#8"
select Finder window 1
select Finder window 1
open document file "t test of Means " of folder " One Population" of folder "Hypotheses Testing" of folder "Hypotheses Section" of folder "MOS Templates" of disk "#8"
end tell
tell application "Microsoft Excel"
Activate
«event miscdosc» "DIRECTORY(\"Macintosh HD:Microsoft Office X:Templates:My Templates\")"
Select Range "R1C1:R1C2"
Save ActiveWorkbook In "Macintosh HD:Microsoft Office X:Templates:My Templates:t test of Means" As xlNormal Password "" WriteReservedPassword "" without ReadOnlyRecommended and CreateBackup
Close ActiveWindow
end tell
tell application "Finder"
activate
select Finder window 1
select Finder window 1
open document file "Variance Test w/ Chi Sq" of folder " One Population" of folder "Hypotheses Testing" of folder "Hypotheses Section" of disk "#8"
end tell
 

pit29

macrumors 6502a
May 23, 2006
611
8
The Golden State
Maybe I just don't get it, but maybe it would help if you explain what you want to do, and where it does not work, instead of posting code.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
In that case, yes you can use the window title. For example
Code:
tell application "Finder"
	select Finder window "robbie"
end tell

selects the window with my home folder in it (if there is one, this will fail if there is no such window)
 

Stats

macrumors newbie
Original poster
Sep 23, 2008
5
0
Florida
Maybe I just don't get it, but maybe it would help if you explain what you want to do, and where it does not work, instead of posting code.

It is very simple -open My templates -open a file -save the file to My templates- close file
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.