tank wrote:
first of all this site itself pisses me off
don't you like Manga?

tank wrote:
second why after reading the tutprial are you sending key strokes
i tried to let you know what i want in the stupiest way...
tank wrote:
third your keystrokes dont work in IE either what made you think they would work in the browser object
really?.... it kinda worked on another code i tried....like 2 minutes ago

tank wrote:
I am tempted to let your lack of effort cause you pain but folks once helped me in my ignorance too
Code:
COM_Invoke(pwb,"document.all.tags[select].item[0].selectedIndex",5) ; 6 th item in the list 5 selects the 6th item in a 0 based index
;dont use the below
;~ sleep 1000
;~ ControlSend, , {tab}, Gui Browser
;~ sleep 1000
;~ ControlSend, , 1/2 prince, Gui Browser
;~ sleep 1000
;~ ControlSend, , Enter, Gui Browser
Yesterday was my first time using COM(you can guest what about knowing this page),im new on ahk and kinda lazy, btw i tried to use another way, i tested it once and didnt work so ill try to check it later... of course ill not write anything else because you helped me

...
Code:
#include COM.AHK
#include ws4ahk.ahk
WS_Initialize("JScript")
COM_AtlAxWinInit()
Gui, +LastFound +Resize
;pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),top,left,width,height, "Shell.Explorer") ) ;left these here just for reference of the parameters
pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),0,0,510,600, "Shell.Explorer") )
;http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.ole.interop.ioleinplaceactiveobject(VS.80).aspx
IOleInPlaceActiveObject_Interface:="{00000117-0000-0000-C000-000000000046}"
pipa := COM_QueryInterface(pwb, "IOleInPlaceActiveObject_Interface")
OnMessage(WM_KEYDOWN:=0x0100, "WM_KEYDOWN")
OnMessage(WM_KEYUP:=0x0101, "WM_KEYDOWN")
gui,show, w510 h600 ,Gui Browser
;take from the IE example
url:="http://www.mininova.org/"
COM_Invoke(pwb, "Navigate", url)
loop
If (rdy:=COM_Invoke(pwb,"readyState") = 4)
break
item:=COM_Invoke(all:=COM_Invoke(doc:=COM_Invoke(pwb,"Document"), "All") ,"Item","cat")
Code =
(
for (i=0 i==item.length i++)
{
if (item.options[i].text=="Books")
{
item.selectedIndex=i
}
}
)
WS_Exec(Code)
msgbox, ok
GuiClose:
Gui, Destroy
COM_CoUninitialize()
COM_AtlAxWinTerm()
ExitApp
GuiSize:
WinMove, % "ahk_id " . COM_AtlAxGetContainer(pwb), , 0,0, A_GuiWidth, A_GuiHeight
return
WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
; Critical 20
;tooltip % wparam
If (wParam = 0x09 || wParam = 0x0D || wParam = 0x2E || wParam = 0x26 || wParam = 0x28) ; tab enter delete up down
;If (wParam = 9 || wParam = 13 || wParam = 46 || wParam = 38 || wParam = 40) ; tab enter delete up down
{
WinGetClass, Class, ahk_id %hWnd%
;tooltip % class
If (Class = "Internet Explorer_Server")
{
Global pipa
VarSetCapacity(Msg, 28)
NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12)
NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)
Return 0
}
}
}
it worked using your code now i need something to go to the page of the selected item lol...