将CSV值粘贴到任何网页的多个“表单”字段中

时间:2011-02-04 16:42:17

标签: bookmarklet paste autohotkey calculator

问题:

网上有很多好的科学计算器页面。

某些计算器页面的文本区域较大, 您可以直接粘贴输入的CSV值。

但是 ......一些计算器表格 要求您输入/粘贴每个输入值 进入单独的表单输入字段!

 [x1] [x2] [x3] ...etc.

如果您想多次输入许多数据点,这很费力......

看看这个前任。计算器:  http://zweigmedia.com/RealWorld/multlinreg.html

另一个例子:  http://zweigmedia.com/RealWorld/newgraph/regressionframes.html

请参阅?您需要单独输入/粘贴每个输入值... argh

问题:

是否有 Bookmarklet AHK Autohotkey脚本, 只需粘贴许多输入CSV值, (可能从Excel电子表格或其他数据输入源复制), 到计算器的所有输入表格字段,AT ONCE?。

如果它是GENERIC脚本/ bkmlt,这将非常有用, (即:对于网络上的任何此类计算器表格)......

THKS! SFdude * Win XP SP3 *

2 个答案:

答案 0 :(得分:0)

我不知道任何这样的脚本,但你可以很容易地自己写一个或雇用某人这样做(vworker.com)。方法是使用论坛中的COM.ahk模块并将javascript发送到浏览器(我知道这至少适用于IE)。

但是,必须为每个计算器自定义javascript。我无法想象这样做的通用方法。

答案 1 :(得分:0)

我假设您已经知道如何从CSV获取数据。将数据输入到网页中就像解析输入表和输入表一样简单。输入数据:

wb := ComObjCreate("InternetExplorer.Application")
wb.Navigate("http://zweigmedia.com/RealWorld/multlinreg.html")
wb.Visible := true
while wb.busy
    sleep 10

n := 0
table := wb.document.theForm.all.tags("table")[0]

; loop through all the rows
; skip Row 0 since its headers - A_Index starts at 1 anyways
Loop % table.rows.length - 1 {
    ; access the cells in the row
    cells := table.rows[A_Index].cells
    ; loop through the cells
    Loop % cells.length
        ; each cell has an input element - access & set the value of this element
        cells[A_Index-1].childNodes[0].value := n++
}

此示例使用AutoHotkey_L