umm...I want to upload flash games on my site..and put those links in one place...later autoit will open each game links from that place then wait... and then go back to that place and will open different flash game link
umm..in that topic, links are limited to numbers, like link1, link2 but...I want to remove numbers... for example, I will upload more links in future, and autoit will open them too....I dont want to edit script everytime I upload links
-----------------------------------------
I made it this far...
#include <IE.au3>
Local $oIE = _IECreate("www.google.com")
_IENavigate($oIE, "http://mywebsite.us/")
_IELinkGetCollection($oIE)
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
Last thing is happening, its collecting all 25 links. Now I need to open them randomly.... Please if someone helps me...I am trying hard but..
-----------------------------------------------------
Ok I tried this method...but looks like its only opening the last link of the page every time ...I set 10 times loops...hoped it will open 10 different links in 10 times but its always opening the last link.. ( where do I miss ?
#include <IE.au3>
Local $oIE = _IECreate("www.google.com")
Local $i = 0
Do
$i = $i + 1
_IENavigate($oIE, "http://mypage.us/")
$oElements = _IETagNameGetCollection($oIE,"A")
$text = ""
For $oElement In $oElements
StringRegExp($oElement.innerText, "Link")
If not @error then $text = $oElement.innerText
Next
_IELinkClickByText($oIE,$text)
sleep(1000)
Until $i = 10
:- posting the solution if anyone needs in future
source:-
Local $oLinks = _IELinkGetCollection($oIE)
Local $iNumLinks = @extended
_IELinkClickByIndex($oIE, Random(0, $iNumLinks))
just posted if someone in future look for it
to disable flash in IE
RegWrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}")
Regwrite("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}", "Compatibility Flags", "REG_DWORD", "1024")
and to enable flash
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11CF-96B8-444553540000}")
OK..I have solved it... it was my fault..I didnt put file path there
ShellExecute("Default.lnk", "", "C:UsersdebojitDDesktop")
sleep(300)
Solves the problem