Posts: 109
Threads: 45
Joined: Mar 2007
I want to have a macro that:
Opens a particular .rtf with Wordpad, size and position the window, sets it to always-on-top
and how to pass command line parameters in case I can strip out the toolbars with parameters upon opening
I've seen act, ont but don't know how specify file AND program or combine ont.
Posts: 11,922
Threads: 138
Joined: Dec 2002
Macro
Macro1269
str s="$my documents$\document.rtf"
s.expandpath
s-"''"; s+"''"
int w1
run "wordpad.exe" s "" "" 0x2800 win("WordPad" "WordPadClass") w1
ont w1
Posts: 109
Threads: 45
Joined: Mar 2007
Thanks Gintaras
Added MoveWindow and it is now complete.
I assume Macro 1269 is just a sample you created, or is it from a library I could have consulted?
Thanks!
Posts: 109
Threads: 45
Joined: Mar 2007
Function
Launch_Instructable
function str&s
s.expandpath
s-"''"; s+"''"
int w1
run "wordpad.exe" s "" "" 0x2800 win("WordPad" "WordPadClass") w1
MoveWindow w1 1424 691 256 300 1
ont w1
I have several rtf's I want to launch through this filter by using a Menu:
Menu
Documents by Email :mac Launch_Instructable("H:\2010\Duties\Instructables\Documents by Email.rtf")
but it won't consider my string as a string:
Error in Instructable Menu3: expected str*
tip: use operator & to get address of variable, or operator + to cast type.
If I run the function from a macro, store the string to s, then pass s to the function its fine.
but I can't declare a variable in a menu as far as I know
and I don't understand how "HL:\2010..." is not a string
how do a run a function from a menu? (each selection is a path to send to the function)
thanks in advance
Posts: 11,922
Threads: 138
Joined: Dec 2002
str&s
->
str's
And remove mac.
Posts: 109
Threads: 45
Joined: Mar 2007