chssoccer Posted December 20, 2007 Share Posted December 20, 2007 (edited) Is it possible and will it work to include an auto hot key script in my autoit program and then call a function from the ahk script, execute it, then continue on with my au3 code? Possible? Will it work? Are there better approachs? And if possible, how? Thanks. Edited December 20, 2007 by chssoccer Link to comment Share on other sites More sharing options...
Paulie Posted December 20, 2007 Share Posted December 20, 2007 Is it possible and will it work to include an auto hot key script in my autoit program and then call a function from the ahk script, execute it, then continue on with my au3 code? Possible? Will it work? Are there better approachs?And if possible, how?Thanks.Personally, a better approach, use Autoit entirely and leave AHK out.But you're opening up a can of something bringing up AHK... Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 Look, I'd love to take your advice, honestly, but I've been having a problem with my au3 script that I found done perfectly in an AHK script. All I need to do is incorporate it into my au3 script. How? Link to comment Share on other sites More sharing options...
weaponx Posted December 20, 2007 Share Posted December 20, 2007 You will have to compile them as seperate exe's, they will not share information easily. Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 You will have to compile them as seperate exe's, they will not share information easily.But they will share it nonetheless? I would rather include the file than compile them separately. Link to comment Share on other sites More sharing options...
weaponx Posted December 20, 2007 Share Posted December 20, 2007 The only info you will share is by means of command line parameters and exit codes. AutoIt cannot talk with AHK. Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 so how can i use command line parameters and/or exit codes to get this done? Link to comment Share on other sites More sharing options...
weaponx Posted December 20, 2007 Share Posted December 20, 2007 Example: $address = "www.google.com" $result = RunWait(@ComSpec & " /c ping " & $address) ;0 = Success, 1 = Failire MsgBox(0,"",$result) You can only return integer exit codes from the compiled program. You will need to post a script for us to help further, there is no reason AutoIt can't do what is in the AHK script. Link to comment Share on other sites More sharing options...
therks Posted December 20, 2007 Share Posted December 20, 2007 Out of curiousity, what exactly are you doing in AHK that you can't accomplish in AutoIt? My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 Out of curiousity, what exactly are you doing in AHK that you can't accomplish in AutoIt?The AHK script can copy listbox items from an external non autoit gui listbox into my scripts listview.I can't figure out how to do that in au3. Thats why Im incorporating the code. Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 Example: $address = "www.google.com" $result = RunWait(@ComSpec & " /c ping " & $address) ;0 = Success, 1 = Failire MsgBox(0,"",$result) You can only return integer exit codes from the compiled program. You will need to post a script for us to help further, there is no reason AutoIt can't do what is in the AHK script. I don't understand what this script does? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 The AHK script can copy listbox items from an external non autoit gui listbox into my scripts listview.I can't figure out how to do that in au3. Thats why Im incorporating the code.This should be doable with AutoIt, _GUICtrlListBox_xxxx functions and _GUICtrlListView_xxxxx functions SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
chssoccer Posted December 20, 2007 Author Share Posted December 20, 2007 how? wheres the code example? Link to comment Share on other sites More sharing options...
GaryFrost Posted December 20, 2007 Share Posted December 20, 2007 how? wheres the code example?In the help file that is installed when you install autoit. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
chssoccer Posted December 21, 2007 Author Share Posted December 21, 2007 This should be doable with AutoIt, _GUICtrlListBox_xxxx functions and _GUICtrlListView_xxxxx functionshow can i do it with version 3.2.8.1? Link to comment Share on other sites More sharing options...
weaponx Posted December 21, 2007 Share Posted December 21, 2007 Why don't you install 3.2.10.0 and the latest version of SciTe? Link to comment Share on other sites More sharing options...
McGod Posted December 21, 2007 Share Posted December 21, 2007 (edited) Edit: That was for ListViews not ListBoxes Read a External Listbox: #include <GUIListBox.au3> #include <Array.au3> Local $sAr = ReadListBoxText("My Listbox", 3) _ArrayDisplay($sAr) Func ReadListBoxText($Window, $ControlID) Local $lbHwd = ControlGetHandle($Window, '', $ControlID) If @error Then Return SetError(1, 0, 0) Local $lbCount = _GUICtrlListBox_GetCount($lbHwd) - 1 Local $lbRet[$lbCount + 1] For $nHw = 0 To $lbCount Step 1 $lbRet[$nHw] = _GUICtrlListBox_GetText($lbHwd, $nHw) Next Return $lbRet EndFuncoÝ÷ ØÌË[£.±çZºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÑÕRSÝÞ]LÉÝÂÔYÚ[ÛÈÈÈÕTÛÙHÕRHÙXÝ[ÛÈÈÈÜOBÌÍÑÜLHHÕRPÜX]J ][ÝÓ^HÝÞ ][ÝËL NLËLJBÌÍÓÝHHÕRPÝÜX]SÝ ][ÝÉ][ÝËNLËÎMBÌÍÒ[]HHÕRPÝÜX]R[] ][ÝÉ][ÝË NLËJBÌÍÐ]ÛHHÕRPÝÜX]P]Û ][ÝÐY[]ÈÝÞ ][ÝË ÌNMKK BÕRTÙ]Ý]JÕ×ÔÒÕÊBÑ[YÚ[ÛÈÈÈSÛÙHÕRHÙXÝ[ÛÈÈÂÚ[HB ÌÍÛÙÈHÕRQÙ]ÙÊ BÝÚ]Ú ÌÍÛÙÂØÙH ÌÍÑÕRWÑUSÐÓÔÑB^]ØÙH ÌÍÐ]ÛBÑÕRPÝÝÞÐYÝ[Ê ÌÍÓÝKÕRPÝXY ÌÍÒ[]JJBÕRPÝÙ]]J ÌÍÒ[]K ][ÝÉ][ÝÊB[ÝÚ]ÚÑ[ The Function returns an array. Edited December 21, 2007 by Chip [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
GaryFrost Posted December 21, 2007 Share Posted December 21, 2007 http://www.autoitscript.com/autoit3/docs/f...rolListView.htmCome on, there's a whole function for Controling ListBoxes.ControlListview and ControlCommand if your using 3.2.8.1 will probably be your best bet.3.2.10.0 introduces a whole bunch of new functionality. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
chssoccer Posted December 22, 2007 Author Share Posted December 22, 2007 (edited) @Chip Why did you post that for 3.2.10.0? How do I do that in 3.2.8.1? Edited December 22, 2007 by chssoccer Link to comment Share on other sites More sharing options...
chssoccer Posted December 22, 2007 Author Share Posted December 22, 2007 (edited) ControlListview and ControlCommand if your using 3.2.8.1 will probably be your best bet.3.2.10.0 introduces a whole bunch of new functionality.ControlListView doesn't control a listbox. All it does is sends a command to a listview. Edited December 22, 2007 by chssoccer Link to comment Share on other sites More sharing options...
Recommended Posts