Jump to content

Send + Explorer Error


Recommended Posts

Hello,

i have a file containing a list of card names i want to send to internet explorer page.

while sending it misses characters in the middle of the sent text.

i decided to do a test to be sure and automate the process to detect the error,  so i send the text to explorer, copy it from explorer, save it in a file then read that file and compare it to the original list using stringinstr.

here's a video of the error.

Link

Edit: you might want to turn down the sound ^

is it a known issue? what can i do to resolve this issue?

using windows 10, US keyboard...

Edited by CrypticKiwi
Link to comment
Share on other sites

Sure, here is the original script i used to grab the images...

#include <IE.au3>
$Handle = fileopen("C:\Users\User\Desktop\MTG\CardList.txt",0)
$Read = FileRead($Handle)
$OCCR = 0
Sleep(10000)
While 1
    $OCCR += 1
    $CardEndLoc = StringInStr($Read,@CR,0,$OCCR)
    $Find = StringInStr($Read,"x ",0,$OCCR)
if $Find <> 0 Then
        $Mid =StringMid($Read,$Find -1,$CardEndLoc - ($Find - 1))
        $XX = StringMid($Mid,1,2)
        $CardName = StringMid($Mid,4,$CardEndLoc)

Else
    ExitLoop
        EndIf
Sleep(2000)
send("{CTRLDOWN}f{CTRLUP}Gatherer{Enter}")
Send("{TAB}{TAB}")
Sleep(1000)
ToolTip($CardName)
Send($CardName)

Send("{Enter}")
Sleep(10000)
$oIE = _IEAttach("Gatherer")
;_IELoadWait($oIE)
$ImageURL = _IEPropertyGet($oIE, "locationurl")
$ImageURL = StringReplace($ImageURL,"/Pages/Card/Details.aspx","/Handlers/Image.ashx")
$ImageURL = $ImageURL&"&type=card"
InetGet($ImageURL,"C:\Users\user\Desktop\MTG\Fridges\"&$XX&" "&$CardName&".png",0,0)
WEnd

i dont think its an error in the script because if you look at the vid the missing character is in the middle of the word.

this is what i used to test...

#include <IE.au3>
$Handle = fileopen("C:\Users\User\Desktop\MTG\CardList.txt",0)
$Read = FileRead($Handle)
$OCCR = 0
Sleep(10000)
While 1
    $OCCR += 1
    $CardEndLoc = StringInStr($Read,@CR,0,$OCCR)
    $Find = StringInStr($Read,"x ",0,$OCCR)
if $Find <> 0 Then
        $Mid =StringMid($Read,$Find -1,$CardEndLoc - ($Find - 1))
        $XX = StringMid($Mid,1,2)
        $CardName = StringMid($Mid,4,$CardEndLoc)

Else
    ExitLoop
        EndIf
Sleep(2000)
send("{CTRLDOWN}f{CTRLUP}Gatherer{Enter}")
Send("{TAB}{TAB}")
Sleep(1000)
ToolTip($CardName)
Send($CardName)
Sleep(1000)
Send("{CTRLDOWN}ac{CTRLUP}")
Sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
Sleep(500)
Send("{CTRLDOWN}a{CTRLUP}{BACKSPACE}")
Sleep(500)
Send("{CTRLDOWN}vs{CTRLUP}")
Sleep(500)
Send("{ALTDOWN}{TAB}{ALTUP}")
Sleep(500)
$Handle2 = FileOpen("C:\Users\User\Desktop\MTG\TestSend.txt",0)
$read2 = FileRead($Handle2)
if StringInStr($Read,$read2) = 0 Then MsgBox("","","Not Found"&"-"&$read2)
WEnd

i also tested this with notepad and no errors found...

CardList.txt

Link to comment
Share on other sites

1 minute ago, Jos said:

This look very much in conflict with our game automation forum rules ....  right?

hi jos, this is not a game to be automated, and i am not using a bot or automating a "game", i just want to download the images...its a long process to do it manually..

Link to comment
Share on other sites

Link to comment
Share on other sites

5 minutes ago, Danyfirex said:

Can you share main url?

 

Saludos

sure dany, URL but inorder to start my script you have to first search for a card for {tab} {tab} to work ,pick a name from the list and search for it.

Edited by CrypticKiwi
Link to comment
Share on other sites

I can't help you right now. But maybe you can do it using a POST method wait the response and then get the image using inetget.

 

Saludos

Link to comment
Share on other sites

27 minutes ago, Danyfirex said:

I can't help you right now. But maybe you can do it using a POST method wait the response and then get the image using inetget.

 

Saludos

Thanks dan, ill try to use post, but this is not the whole issue. i use the send command for alot of tasks unattended and i want to know/be sure if i can depend on it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...