Announcement

Collapse
No announcement yet.

doubt ams8 and pass string variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • doubt ams8 and pass string variable

    Hi all
    Im having some trouble in passing a sort of string variable from a command menu context on Windows to the self ams8 (compiled to web exe) executable which this exe once its opened (better said I try to get the string) the exe shows a label with that string to user.

    Example

    I have this reg file to get an idea of the item I included to a menu context (set to be executed over exe files)

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\exefile\shell\extractor]
    @="call it!"
    "Icon"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\extractor\command]
    @="\"%1\" \"%1\"hello my friend!"
    when you execute a exe file eg. "Say Hello.exe" by using a command menu context called for example "call it!", this opens that exe and inside in on startup I have this code that it does display the string Im looking for,

    Code:
    isText = Clipboard.IsTextAvailable();
    if isText == true then
    cadena = Clipboard.GetText();
    Label.SetText("Label1", cadena);
    else
    result = Dialog.Message("Notice", "No text found", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    end
    The problem is that I cant get the "hello my friend!" string put into the label on screen, what is the problem? Is here any way to get that word pasted in the label?

  • #2
    Are you attempting to use the Clipboard plugin actions for getting a command line parameter? I don't see the relation.

    Ulrich

    Comment


    • #3
      Hi Ulrich
      the clipboard is a vague attempt (because im still figuring out how to get that string word, not the whole commandline in it) to catch the string (with not success at all)

      Comment


      • #4
        Were you able to retrieve the command line argument at all, and show it in the Label object? If not, have you seen these explanations?

        Ulrich

        Comment


        • #5
          Originally posted by Ulrich View Post
          Were you able to retrieve the command line argument at all, and show it in the Label object? If not, have you seen these explanations?

          Ulrich
          I didnt know or remember about sfx commandline, this doc you passed me is valid for a previously registered reg file with the info in it? The problem is that i dont know how to pass a string into ams8 from outside (the command in context menu was generated by importing first a reg file before doing click exe in the command menu) Im not sure if you can understand what am I saying here...

          I try to ignore the %1 that substitute the exe called itself only I try to pass the "hello my friend!" part, is there any way to declare this phrase as string to pass (if I were to use those sfx commandline you passed me)?

          Comment


          • #6
            Hi ulrich, I got solved this problem, by using the _commandlineargs function you suggested me I got finally my target. Thank you!

            Comment

            Working...
            X