Jump to content

Recommended Posts

Posted (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 by chssoccer
Posted

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...

Posted

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?

Posted

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.

Posted

The only info you will share is by means of command line parameters and exit codes. AutoIt cannot talk with AHK.

Posted

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.

Posted

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.

Posted

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

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.

 

Posted (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 by Chip
Posted

http://www.autoitscript.com/autoit3/docs/f...rolListView.htm

Come 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.

 

Posted (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 by chssoccer
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...