Jump to content
CrypticKiwi

Send + Explorer Error

Recommended Posts

CrypticKiwi

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

Share this post


Link to post
Share on other sites
AutoBert

I don't like showing a video, but the code what you have tried .

Share this post


Link to post
Share on other sites
CrypticKiwi

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

Share this post


Link to post
Share on other sites
CrypticKiwi
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..

Share this post


Link to post
Share on other sites
Danyfirex

Can you share main url?

 

Saludos

Share this post


Link to post
Share on other sites
CrypticKiwi
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

Share this post


Link to post
Share on other sites
Danyfirex

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

Share this post


Link to post
Share on other sites
CrypticKiwi
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.

Share this post


Link to post
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

  • Similar Content

    • Fortitude
      By Fortitude
      Hello!
      I have made a program, that opens a folder, and then store the path ("C:\programFiles\etc") in a variable.
      Then i need to open the command panel as administrator, and write  in the stored path, and some other text.

      Can i somehow instantly copypaste the text i needed, instead of writing in the command panel with the Send commands?
       
      #RequireAdmin #include <MsgBoxConstants.au3> Global Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Global $sFileSelectFolder = FileSelectFolder($sMessage, "") If @error Then MsgBox($MB_SYSTEMMODAL, "", "Nem választottál ki mappát!") Exit EndIf Global $Tiff_path = $sFileSelectFolder & "\TiffChecker_2_32" FileCopy( "C:\TiffChecker_2_32.exe" , $sFileSelectFolder) $CMD = $Tiff_path & " " & $sFileSelectFolder & " /s/d" Run("C:\WINDOWS\system32\cmd.exe") WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send($CMD) Sleep(1000) Send("{ENTER}") sleep(1000) MsgBox(0,"Press OK", "Press OK to continue") FileCopy("C:\Tiffchecker.txt", $sFileSelectFolder) Also, how do i close the command panel, when the program is finished? (usually its under 1 second, so after the send i just put a Sleep function there)
    • Docfxit
      By Docfxit
      I would like to know if there is a way to make the send cmd send characters when using
      Graphical AutoIt Debugger By Stumpii,
      If Not WinActive("Setup - UltraVNC","Setup is preparing to install") Then WinActivate("Setup - UltraVNC","Setup is preparing to install") WinWaitActive("Setup - UltraVNC","Setup is preparing to install") Send("{ALTDOWN}f{ALTUP}") ;Finish The debugger when using step mode will execute the Send cmd line but the window doesn't receive the input.
      Thanks,
      Docfxit
    • PoojaKrishna
      By PoojaKrishna
      Hi friends,
      I'm trying to send SHIFTDOWN, to keep the Shift key pressed until I close the program or releases the key.
      Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is down. Type something: ") $ret = Msgbox(0,"", "Press and release shift key manually and select [Ok] to continue") $text = InputBox("Shift key up", "Shift key is released manually, now type something: ") Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down Agin", "Shift key is pressed again, now type something: ") In the above program sequence,
      1. Send SHIFTDOWN from program, Works as we type in the text are in Capital letters
      2. Manually presses and releases the SHIFT button. SHIFT key is released as when we type, text is in small letters only.
      3. Again send SHIFTDOWN from program, but not working. When we type the letters are in small letters.
       
      If we send a SHIFTUP  before  sending the SHIFTDOWN again, then it is working correctly and the text appears in capital letters only. Can any one explain why this happens?
      Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is down. Type something: ") $ret = Msgbox(0,"", "Press and release shift key and select [Ok] to continue") $text = InputBox("Shift key up", "Shift key is released manually, now type something: ") Send ( "{SHIFTUP}") sleep(100) Send ( "{SHIFTDOWN}") sleep(100) $text = InputBox("Shift key down", "Shift key is pressed, now type something: ")  
      Thank you.
    • TheDcoder
      By TheDcoder
      Hello everyone, long time since I made a post in the H&S sub-forum
      I am working on a project where in a situation I would have to hold down an arrow key and release it in another statement/command, however when I wrote the code it isn't working exactly like I thought it would. Here is an example:
      Send("{UP down}") Sleep(10000) Send("{UP up}") This should hold the up arrow key for 10 seconds before releasing it again, but when I run this code the cursor in SciTE moves up only once
      If I hold the up arrow manually for 10 seconds it "repeats" and the cursor moves up several times until I release the key... Is this a known limitation of Send? Is there any other way I can accomplish this?
      Thanks for all the help and feedback in advance! TD
    • Pintu
      By Pintu
      Good evening guys,
      i'm having a problem, not about the code (i'm only thinking about it at the moment) but about the way i can do it.
      I have a webpage (photo N.1) it has some elements in it.
      I need only the table (photo N.2), looking at the code and with _IEFunctions i can easy find the table but how i can i "copy" it?
      As i said it's really easy to found with a script but what should i do then? Copy the source? And how can i display it to the user?
      In my head i'd like to display it inside a GUI, is that possible?
       
      Thanks in advance
       
      Edit: Posted 2 times same photo. Now should be OK

       

×