Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] run code copied from elsewhere - possible?
#1
Hi,

I have quickmacros code stored in a spreadsheet.

I'd like to have a qm function execute the code that I stored in my cells.

Is this possible? If so, how?

For example,

a1 contains the content

Code:
Copy      Help
int w=win("" "Mozilla*WindowClass" "" 0x4)
act w

Acc a.FindFF(w "DIV" "" "contenteditable=true" 0x1004)
a.DoDefaultAction

Thank you.
#2
Possible, but not in exe.
Use function RunTextAsFunction or other similar functions from the qm category.
Use this only if necessary. If possible, instead use variables for strings and numbers; Use if or sel/case to select different code on different conditions.
#3
Quote:instead use variables for strings and numbers; Use if or sel/case to select different code on different conditions

I'm sorry, I don't understand.

Could you illustrate with an example?
#4
if condition
,s="contenteditable=true"
else
,s="contenteditable=false"
Acc a.FindFF(w "DIV" "" s 0x1004)
#5
Got it. Thank you!

btw, quickmacros is amazing. I've already made dozens of useful macros with quickmacros. I even added features/fixed the ui of a frequently used design software thanks to this beast! Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)