Results 1 to 5 of 5

Thread: Need help to embed my program

  1. #1
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,839

    Smile 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 ?

  2. #2
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,618
    Does autoit not have a command similar to Vb6's app.PrevInstance which is used to end a vb program it a previous instance is detected.

  3. #3
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    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."

  4. #4
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,839

    Smile

    Quote 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

  5. #5
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,839

    Cool

    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 !

Similar Threads

  1. Replies: 92
    Last Post: 05-09-2014, 09:10 AM
  2. how can i embed any program into a generic skin file?
    By brandensin in forum Road Runner
    Replies: 9
    Last Post: 08-04-2008, 12:25 PM
  3. Old program i cant find.. need help?
    By strollin79 in forum Software & Software Development
    Replies: 0
    Last Post: 01-31-2008, 10:23 AM
  4. [Release] SKINbedder v2
    By 0l33l in forum SkinBedder
    Replies: 242
    Last Post: 07-05-2005, 04:01 AM
  5. Can someone write me a PIC program 4 a awesome s/down controller please?
    By gizmos in forum General Hardware Discussion
    Replies: 3
    Last Post: 07-17-2000, 12:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •