Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qmDialogSwitcher
#1
when working with smart dialogs you might find my function usefull.
the macro should be fired from your custom qm editor toolbar.
its thought as run dialog button.
toggle between edit dialog and run dialog.

the run macro part is not included.
you have to add it on your own :mrgreen:

Function qmDialogSwitcher
Code:
Copy      Help
out
str mName.getmacro("" 1)
str mCode.getmacro("")

;str firstline.getl(mCode 0)

int i=findw( mCode "\Dialog_Editor")    
sel i
,case 0
,,mCode.from(" " mCode)
,case 1
,,mCode.ltrim
,case else
,,out "this is not a dialog"
,,end
,,
mCode.setmacro(mName)
pi
#2
could be coded better Confusedhock:

Function qmDialogSwitcher
Code:
Copy      Help
out
str mName.getmacro("" 1)
str mCode.getmacro("")
str firstline.getl(mCode 0)
int i=findw( mCode "\Dialog_Editor")    

if i<2
,if i=0
,,mCode.from(" " mCode)
,else
,,mCode.ltrim
,mCode.setmacro(mName)
,0.5
,key Cr
else
,mes "this is not a dialog"
pi
#3
Liked the idea. Made it a bit different.

Function qmDialogSwitcher
Code:
Copy      Help
str mName.getmacro("" 1)
str mCode.getmacro("")
str firstline.getl(mCode)


if(find(firstline "\Dialog_Editor")=-1) ret

if(firstline.beg(" ")) mCode.ltrim
else mCode- " "

mCode.setmacro(mName)
key Cr


Forum Jump:


Users browsing this thread: 1 Guest(s)