Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open WordPad, Resize, Reposition, Always On Top
#1
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.
#2
Macro Macro1269
Code:
Copy      Help
str s="$my documents$\document.rtf"
s.expandpath
s-"''"; s+"''"
int w1
run "wordpad.exe" s "" "" 0x2800 win("WordPad" "WordPadClass") w1
ont w1
#3
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!
#4
Function Launch_Instructable
Code:
Copy      Help
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
Code:
Copy      Help
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
#5
str&s

->

str's

And remove mac.
#6
awesome
thanks


Forum Jump:


Users browsing this thread: 1 Guest(s)