Function inside a super genie(Pop-up)

Hi.

I'm trying to figure out how to re-use the variables inside the PopUpPage.

Here's a link to the function im trying to use inside my popup.

proscada.ru/ctkbase.en/resources/attachments/q4572/exec-guid36c264eab1aa4e048470d7d23cdeb0c2.ci

This simple function works in the genie but not in a super genie.

//MouseButtonDown

ExecEx("%Drawing%")

I've tried replacing the % sign with ? and lots of other ways, with no success. (The function still works if I just type in a "direct" path to open a folder., but I want to use a variable, that I can edit)

FUNCTION

PopUpPage(INT X,INT Y,INT Mode, STRING Drawing)

WinNewAt("!PopUpPage",X,Y,Mode);
SleepMS(25);
WinTitle("TITLE");

Got any ideas?

Thanks in advance.

Robin

Parents
  • OK, so there are a couple of problems I think, but first of all, where you have ExecEx(...\Documents\" + "?Drawing?" + ".pdf"), The quotes (") around ?Drawing? mean that ?Drawing? is being treated as a literal string rather than a substitution. You need to get rid of the quotes around ?Drawing?. There is another potential problem with string substitutions, where they aren't implicitly cast, so you may need to put ?string Drawing? in your command. It won't hurt anyway. A final pointer, which may help you in the future for these sorts of problems is to send your built up string to a Message() or TraceMsg() command to see what Citect is actually producing from your code.

    You could also put ?string Drawing? into a string on the final page just to make sure and see it hasn't gotten lost along the way.

    So something like this:
    ExecEx("C:\Users\Public\Documents\" + ?String Drawing? + ".pdf")

    HTH
Reply
  • OK, so there are a couple of problems I think, but first of all, where you have ExecEx(...\Documents\" + "?Drawing?" + ".pdf"), The quotes (") around ?Drawing? mean that ?Drawing? is being treated as a literal string rather than a substitution. You need to get rid of the quotes around ?Drawing?. There is another potential problem with string substitutions, where they aren't implicitly cast, so you may need to put ?string Drawing? in your command. It won't hurt anyway. A final pointer, which may help you in the future for these sorts of problems is to send your built up string to a Message() or TraceMsg() command to see what Citect is actually producing from your code.

    You could also put ?string Drawing? into a string on the final page just to make sure and see it hasn't gotten lost along the way.

    So something like this:
    ExecEx("C:\Users\Public\Documents\" + ?String Drawing? + ".pdf")

    HTH
Children
No Data