Jump to content

Weird send/controlsend from large array issue


Recommended Posts

Okay, so here's what has been happening. I have a script that sends an element of an array to a "virtual" text box on a website, then tab, then a "1" in the other text box, then tab, then starts over.

If the array is < ~1000 or so, sometimes as high as 1500, sometimes as low as 800, it will put through just about everything as it should (and I have a checker to clean up any misses). There is the occasional wrong case or missed letter, but for the most part it's fine.

If the array is larger, say over 2000, it will start to hiccup (usually north of 1000 somewhere). So instead of AB100-54321 being in the first box you'll end up with 1AB10-05432-1 (the website inserts the hyphens), or you'll end up with AB100-54321 in the second box, or some combination thereof. So I thought, well, with something that large and no way to confirm it's gone where it was supposed to, it probably sent the strokes correctly and the site couldn't keep up.

So I put a little ticker in there so that regardless of the array's size, it will pause after 32 part numbers are sent through, click the button to start a new entry (the same as when the script starts), and start with a controlsend of the next part number. The trouble is, once you get around 13/14/1500 deep, it will start putting the "1" right off the bat, then a tab, then another tab, then it will start putting a "1" in front of every part number. It hits the reset, and the first thing you get is a "1". Look at the script....there is no way it should be able to do that (unless $arrayDD[$i] was = 1).

This is a more complex iteration of the script than what I had originally, but even just using Send and with most of the other items stripped out (no arrayadd, no progress bar, etc.) it still did the same thing.

Any ideas? Sorry for the verbose explanation.

EDIT: That array constructed from the $sCellValue values comes back correct with no errors so it seems to be specifically related to the controlsend commands.

For $i = 1 To UBound($arrayDD) -1
$sCellValue = $arrayDD[$i]
_ArrayAdd($arrayTemp, $sCellValue)

sleep($DDPNTBdelay) ;<<<--- Sleep(350)

ControlSend($HWND, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", $sCellValue)
sleep(20)
ControlSend($HWND, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{TAB}")
sleep(20)
ControlSend($HWND, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "1")
sleep(20)
ControlSend($HWND, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{TAB}")
sleep(50)

$p = ($i / (($u - 1)/100))
ProgressSet($p, $i&"/"&($u - 1)&" Completed")
If $ticker > 30 Then
ControlSend($HWND, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "!i")
Sleep(1000)
IEWinWaitReady("Dealer Daily", $oIE)
$ticker = 0
Else
$ticker = $ticker + 1
EndIf
Next
Edited by drapdv
Link to comment
Share on other sites

it shouldnt do that what windows is ur PC ?

Thank you for such a quick reply!

It is Windows XP Professional.

Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 3 CPU:X64 OS:X86)

EDIT: Just did it again but ControlSend to Notepad and it did the same thing, although to a much lesser extent...

Edited by drapdv
Link to comment
Share on other sites

  • Moderators

drapdv,

I have tried your script several times and sent 4000 element arrays to Notepad without any problem. It must be something in your system or the website.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

drapdv,

I have tried your script several times and sent 4000 element arrays to Notepad without any problem. It must be something in your system or the website.

M23

Good enough. At least I know where to start troubleshooting. Thank you very much for your time and assistance!

Link to comment
Share on other sites

  • Moderators

drapdv,

Sorry I could not be of more help. :mellow:

I will try to do better next time. :P

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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

  • Recently Browsing   0 members

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