Grab each line
#1
Posted 18 August 2012 - 12:58 PM
#2
Posted 18 August 2012 - 01:01 PM
#3
Posted 18 August 2012 - 01:52 PM
#4
Posted 18 August 2012 - 02:28 PM
#5
Posted 18 August 2012 - 05:40 PM
#6
Posted 18 August 2012 - 06:39 PM
#7
Posted 18 August 2012 - 06:54 PM
Included with installation of AHk is a helpfile. The helpfile is mirrored on the AHk website.
Depending on the version you have installed it is at a different places
Ahk_basic <!-- m -->http://www.autohotkey.com/docs/<!-- m -->
AHK_L <!-- m -->http://l.autohotkey.net/docs/<!-- m -->
Within those docs is a command list, and withing that list is ClipWait <!-- m -->http://www.autohotke...ds/ClipWait.htm<!-- m -->
On the ClipWait page is a hyperlink to lots of info on using the clipboard,
"...
clipboard contains data." <!-- m -->http://www.autohotke...c/Clipboard.htm<!-- m -->The first example shows how to >parse< the clipboard.
btw, in computer terminology >parse< means to "cut into pieces."
#8
Posted 18 August 2012 - 10:02 PM
StringSplit, outputarray, clipboard, ``n MsgBox %outputarray23% ; line 23
What am I doing wrong here?
#9
Posted 18 August 2012 - 10:13 PM
StringSplit, outputarray, clipboard, `n MsgBox %outputarray23% ; line 23
#10
Posted 18 August 2012 - 11:47 PM
StringSplit, outputarray, clipboard, `n
;MsgBox %outputarray23% ; line 23
SendInput %date%
Sleep 200
SendInput {Tab}
Sleep 200
SendInput %outputarray23% ; Orders-Product Charges
#11
Posted 19 August 2012 - 12:18 AM
Btw, the lines between /* and */ are ignored by AHk.
With notepad open I selected and the array of numbers, and copied the slection with ^c.
I opened a blank workbook in excel and selected a cell.
When I hit F1, the selected cell moved 1 to the right and then "23" was entered into that new cell.
It appears that somewhere in the process, a tab character is picked-up and that causes the tab to the adjacent cell.
Try this script and report back. Please follow my steps as closely as possible and be as specific as possible in your report.
/*
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
*/
return
f1::
StringSplit, outputarray, clipboard, `n
;MsgBox %outputarray23% ; line 23
SendInput %date%
Sleep 200
SendInput {Tab}
Sleep 200
SendInput %outputarray23% ; Orders-Product Charges
return
#12
Posted 19 August 2012 - 12:03 PM
Also, could I do a StringReplace on all the tab keys and convert them to spaces?
Thanks!
#13
Posted 19 August 2012 - 01:53 PM
You previous post said that you got the "entire contents of the clipboard wirh excel."
I asked you to do precise steps (in order to diagnose your problem.)
AFAIK, You failed to do any of those steps and instead you theorized on what my results were.
#14
Posted 19 August 2012 - 05:01 PM
#15
Posted 20 August 2012 - 02:34 AM
You listed your results, which were contrary to what should have been expected.It seems to work perfectly fine with a MsgBox, but I get the entire contents of the clipboard with Excel.
The expected results should have been the same for msgbox and sendinput.
Therefore, I laid out the steps I used to test your script.
And I wrote:
"...Try this script and report back. Please follow my steps..."
The purpose of the steps is to provide a 'baseline' so that we are using the same info.
If you want help from me, follow through with my request.




