我正在制作一个autohotkey脚本,允许我选择文本/代码切换剪贴板并点击键盘组合,然后将其作为我的帐户下pastbin.com网站上的新条目发布,并返回新的pastebin的URL .com进入我的剪贴板.
到目前为止,我有一个很好的例外.以下是我的自动密码...
; ******* INFO *******
; < Pastebin.com copy/paste> - Instantly share your code on pastebin.com
; SCRIPT FUNCTION: Press hotkey (ctrl+shift+c) to save selected text to  pastebin.com
; ******* Initiate script *******
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance, Force
; ******* Hotkeys - Post Code and Get URL *******
^+c::
Send ^c
ClipWait
pastestring:=ClipBoard
api_user_key:="cd25-CHANGED-7c0158bgg06a91e617"
api_dev_key:="24-CHANGED-eecedghb97f35"
URL:="http://pastebin.com/api/api_post.php"
POSTDATA := "api_paste_code=" pastestring "&api_user_key=" api_user_key "&api_paste_name=" filename "&api_paste_private=1&api_paste_format=php&api_dev_key=" api_dev_key "&api_option=paste"
html := httpQUERY(URL,POSTDATA)
Clipboard:=html
TrayTip, AHKClipper, Added %Html%, 2, 1
真正的魔力发生在
函数调用 httpQUERY(URL,POSTDATA)
该函数的代码位于此处的文件中... http://pastebin.com/Bcb3ELPE 我在那里发布它,因为它就像200多行,并不是真的需要回答这个问题.
现在问题是我的脚本上面工作,我必须将httpquery.ahk文件的内容包含在我上面的.ahk文件中.
是不是有一些方法可以将该文件包含在其中而不会将所有代码混乱到我自己的文件中?
| 归档时间: | 
 | 
| 查看次数: | 4852 次 | 
| 最近记录: |