Announcement

Collapse
No announcement yet.

Need help to embed my program

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

  • Need help to embed my program

    Hello,

    Into one of mine script, here RRTranslator, i create a windows 'English Dictionary' that i want to embed into a scpecific screen translator_definition.skin .

    My problem is that i don't create immediately this window (when translator.exe is launched) but just when i want this window.

    So , i have tried that but with an issue :
    Code:
    $GUIDef = GUICreate("English Dictionary", 600, 370)
    $Edit = GUICtrlCreateEdit("", 15, 15, 570, 300, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL))
    GUICtrlSetFont(-1, 13, 400, 0, "Arial")
    $Quit = GUICtrlCreateButton("Quit", 535, 330, 50, 25, $BS_DEFPUSHBUTTON)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial")
    $TexttoTranslate = $rr.getinfo("=$TEXTTOTRANSLATE$");récupère le texte dont on veut une définition
    $sDefinitions = _GetDefinitions($TexttoTranslate);renvoie la définition
    GUISetState(@SW_SHOW,$GUIDef)
    $rr.execute("menu;translator_definition.skin;definition;$skinpath$Scripts\Translator\Translator.exe;English Dictionary")
    GUICtrlSetData($Edit, $sDefinitions)
    While 1
    	$msg = GUIGetMsg()
    	If $msg = $Quit Then
    		GUIDelete($GUIDef)
    		$rr.execute("ESC")
    		exitloop
    	EndIf
    WEnd
    As you can to see, i relaunch translator.exe,
    Code:
    $rr.execute("menu;translator_definition.skin;definition;$skinpath$Scripts\Translator\Translator.exe;English Dictionary")
    but without that i want .

    Is it possible to write that:
    Code:
    $rr.execute("menu;translator_definition.skin;;;English Dictionary")
    How can i do to embed this windows please ?

  • #3
    You don't have to relaunch the application.

    Try:
    Code:
    $rr.execute("menu;translator_definition.skin||run;;English Dictionary")
    This should work.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

    Comment


    • #4
      Originally posted by guino View Post
      This should work.
      This is my new code:
      Code:
      	If $cmd = "GETDEFINITION" Then;recherche d'une définition dictionnaire
      	  $cmd = ""
      	  	$Main = GUICreate("English Dictionary", 600, 370, -1, -1, BitOR($WS_SIZEBOX, $WS_MAXIMIZEBOX))
      		$Edit = GUICtrlCreateEdit("", 15, 15, 570, 300, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_READONLY, $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL))
      		GUICtrlSetFont(-1, 13, 400, 0, "Arial")
      		$TexttoTranslate = $rr.getinfo("=$TEXTTOTRANSLATE$");récupère le texte dont on veut une définition
      		$sDefinitions = _GetDefinitions($TexttoTranslate);renvoie la définition
      		GUISetState(@SW_SHOW,$Main)
      		$rr.execute("menu;translator_definition.skin||run;;English Dictionary")
      		GUICtrlSetData($Edit, $sDefinitions)
      	EndIf
      
      	If $cmd = "KILLDEFINITION" Then;fermeture de la fenêtre de définition
      	  $cmd = ""
      		GUIDelete($Main)
      		GUISetState(@SW_HIDE,$hwmd_Reciver)
      		$rr.execute("ESC")
      	Endif
      It's better but the GUI is not embedded into the translator_definition.skin correctly !



      translator_definition.skin
      Code:
      RoadRunner Skin
      RRScreen Translator
      Translator_Definition_Off.png,Translator_Definition_Off.png,Translator_Definition_On.png,Translator_Definition_Off.png
      A,63,57,600,370,
      IMG,21,10,65,41,"translator.png",all
      L,313,439,103,31,255,255,255,18,"Arial:B","=Back","CENTER",,"DS=2,2,0,0,0"
      L,107,18,605,25,255,255,0,18,"Arial","=$TitleDefinition$","LEFT",,"DS=,2,2,0,0"
      B,272,436,177,43,"SENDMSG;Translator;KILLDEFINITION",
       
      END

      Comment


      • #5
        I have found my issue. If i use a 'load' and not a 'menu' command, it's better !
        $rr.execute("menu;translator_definition.skin||run; ;English Dictionary")
        replaced by:
        $rr.execute("load;translator_definition.skin||run; ;English Dictionary")



        But the screen stay on the bottom task bar, and i need to click on the roadrunner to see my screen and the GUI well embedded !

        Comment

        Working...
        X