Search found 1597 matches

by tmplinshi
24 Oct 2020, 11:11
Forum: 请求帮助
Topic: 求一个上传图片到谷歌图片搜索的脚本 Topic is solved
Replies: 13
Views: 1958

Re: 求一个上传图片到谷歌图片搜索的脚本 Topic is solved

pk23 CreateFormData 是用来创建 Content-Type 为 multipart/form-data 的数据, 与你使用什么请求方法并没有关系. multipart/form-data 类型的数据是由键值组成的, 而你那个帖子提到的 API 显然不是接收这种类型的数据, 它仅仅需要文件数据本身, 没有什么键名. 你不需要设置 Content-Type, 只需要使用 whr.Send( BinArr_FromFile(filepath) ) , 或者使用 malcev 的方法: ... whr.Send( fileToSafeArray(filePath) ) fileTo...
by tmplinshi
22 Oct 2020, 00:39
Forum: 请求帮助
Topic: 求一个上传图片到谷歌图片搜索的脚本 Topic is solved
Replies: 13
Views: 1958

Re: 求一个上传图片到谷歌图片搜索的脚本 Topic is solved

如果你电脑上有装 ss, 那么使用 UploadToImgur(filename,, "localhost:1080") 上传图片到谷歌图片搜索: resultUrl := GoogleSearchByImage_Upload("C:\test.png", "localhost:1080") Run, % resultUrl GoogleSearchByImage_Upload(FileName, Proxy := "") { if !FileExist(FileName) throw "file not exist" CreateFormData( postData, contentType...
by tmplinshi
28 Sep 2020, 11:50
Forum: Ask For Help
Topic: PS1 script to AHK
Replies: 16
Views: 546

Re: PS1 script to AHK

try: SetBatchLines -1 script = ( echo "Name, Serial" ForEach ($Monitor in Get-WmiObject WmiMonitorID -Namespace root\wmi) { $Name = $Monitor.UserFriendlyName -notmatch 0 $Serial = $Monitor.SerialNumberID -notmatch 0 echo "$Name, $Serial" } ) MsgBox % data := decode( RunPowershellCode(script) ) FileO...
by tmplinshi
26 Sep 2020, 09:35
Forum: Ask For Help
Topic: PS1 script to AHK
Replies: 16
Views: 546

Re: PS1 script to AHK

You can copy CLR.ahk from the codebox, at the end of the post
by tmplinshi
26 Sep 2020, 03:56
Forum: AutoHotkey_H
Topic: [Gui Script] Register .ahkh file type for H1
Replies: 0
Views: 209

[Gui Script] Register .ahkh file type for H1

RunAsAdmin(true) Gui, Add, Text, w50 Right , Dir: Gui, Add, Edit, x+10 w400 HWNDhEdit1 vDir, ahkdll-v1-release-master\Win32w Gui, Add, Text, w50 Right xm, Editor: Gui, Add, Edit, x+10 w400 vEditor, notepad.exe Gui, Add, Button, y+30 xp+100, Register Gui, Show Return ButtonRegister: Gui, Submit, NoH...
by tmplinshi
26 Sep 2020, 01:47
Forum: Ask For Help
Topic: PS1 script to AHK
Replies: 16
Views: 546

Re: PS1 script to AHK

How about getting output from powershell.. #include CLR.ahk ; https://www.autohotkey.com/boards/viewtopic.php?t=4633 script = ( function Decode { If ($args[0] -is [System.Array]) { [System.Text.Encoding]::ASCII.GetString($args[0]) } Else { "Not Found" } } echo "Name, Serial" ForEach ($Monitor in Get...
by tmplinshi
26 Sep 2020, 01:09
Forum: Ask For Help
Topic: How can I set an edit control to be Latin-only? Topic is solved
Replies: 4
Views: 146

Re: How can I set an edit control to be Latin-only? Topic is solved

DisableControlIME(hWnd, bDisable := true) { flag := bDisable ? 0x0020 ; IACE_IGNORENOCONTEXT : 0x0010 ; IACE_DEFAULT DllCall("Imm32\ImmAssociateContextEx", "ptr", hWnd, "ptr", 0, "uint", flag) } ; Example Gui, Add, Edit, xm w300 +HwndhEdit, Gui, Add, Checkbox, x+10 hp vcb2 gDisableIME, Disable IME ...
by tmplinshi
22 Sep 2020, 20:14
Forum: Ask For Help
Topic: Uploading image link to Imgur Topic is solved
Replies: 13
Views: 646

Re: Uploading image link to Imgur Topic is solved

Sorry, didn't read your question carefully. try this: Msgbox % UploadToImgur(clipboard) ; Image can be a filename, base64 or URL UploadToImgur(Image, ClientID := "fbf77ff49c42c8a") { if FileExist(Image) { FileGetSize size, %Image% ; get file size in bytes PostData := ComObjArray(0x11, size) ; Create...
by tmplinshi
22 Sep 2020, 16:15
Forum: Ask For Help
Topic: Uploading image link to Imgur Topic is solved
Replies: 13
Views: 646

Re: Uploading image link to Imgur Topic is solved

https://www.autohotkey.com/boards/viewtopic.php?p=300157#p300157 or: #Include ImagePut.ahk ; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=76301 MsgBox % Imgur_UploadFromClipboard() Imgur_UploadFromClipboard(ClientID := "fbf77ff49c42c8a") { body := ClipImageToByteArray() whr := ComObjCreate(...
by tmplinshi
17 Sep 2020, 00:30
Forum: Wish List
Topic: Add ahk_hwnd to work with hidden windows
Replies: 2
Views: 359

Re: Add ahk_hwnd to work with hidden windows

Thanks lexikos. That's a nice feature of v2.
by tmplinshi
16 Sep 2020, 01:45
Forum: Wish List
Topic: Add ahk_hwnd to work with hidden windows
Replies: 2
Views: 359

Add ahk_hwnd to work with hidden windows

When using commands like WinGetTitle/WinMove, there is no need to turn on DetectHiddenWindows if you have the hwnd.

It would be very useful to have a ahk_hwnd similar to ahk_id, but does not require you to turn on DetectHiddenWindows.
by tmplinshi
11 Sep 2020, 06:52
Forum: 请求帮助
Topic: 修饰键映射问题求教 Topic is solved
Replies: 5
Views: 14926

Re: 修饰键映射问题求教 Topic is solved

首先, 空格的名称是 {Space} , 而不是 {SPC} 然后, 可以用 A_TimeSinceThisHotkey 来判断长按短按 ^r::MsgBox Ctrl + r ^!r::MsgBox Alt + Ctrl + r Lalt:: Send {LControl Down} KeyWait, Lalt Send {LControl Up} If (A_TimeSinceThisHotkey < 300) { Send {Space} } return 以上代码可以区分长按短按, 但是当你长按住 alt , 再按 r , 会发现实际上触发的是 Alt + Ctrl + r , 而不是...
by tmplinshi
11 Sep 2020, 03:29
Forum: 请求帮助
Topic: 修饰键映射问题求教 Topic is solved
Replies: 5
Views: 14926

Re: 修饰键映射问题求教 Topic is solved

Code: Select all

; 单击 LAlt 输出空格,按住不放为 LControl
LAlt::
	KeyWait, LAlt, T0.3 ; 等待 LAlt 松开, 等待时间 0.3 秒
	if ErrorLevel { ; 超时
		LAlt::LControl
	} else {
		Send {Space}
	}
Return
by tmplinshi
10 Sep 2020, 08:45
Forum: Scripts and Functions
Topic: GuiShow() with MonitorN option supported
Replies: 3
Views: 292

GuiShow() with MonitorN option supported

; GuiShow("w400 h400 Monitor2") GuiShow(Options := "", Title := "", GuiName := 1) { SysGet, mCount, MonitorCount SysGet, mPrimary, MonitorPrimary if RegExMatch(Options, "i)Monitor\K\d+", mNumber) Options := StrReplace(Options, "Monitor" mNumber) if !mNumber || (mCount = 1) || (mNumber = mPrimary) {...
by tmplinshi
08 Sep 2020, 01:17
Forum: Ask For Help
Topic: transparent windows in screen-shots
Replies: 19
Views: 1985

Re: transparent windows in screen-shots

but there is the similar problem (as in the 3rd message of this thread). the problem is related to the creation of a png-file. example: - a screen-shot should be saved inside the "scr-ss" folder (in the desktop) - i change the 2nd line to: filepath := "C:\Documents and Settings\Administrator\Deskto...
by tmplinshi
08 Sep 2020, 00:38
Forum: Ask For Help
Topic: AHK Gui - Redrawing the screen
Replies: 4
Views: 128

Re: AHK Gui - Redrawing the screen

Instead of using MoveDraw, use Move and DllCall("InvalidateRect", "ptr", ControlHwnd, "ptr", 0, "int", 0)
by tmplinshi
07 Sep 2020, 13:04
Forum: Ask For Help
Topic: Catching the context in MS Word
Replies: 3
Views: 110

Re: Catching the context in MS Word

Hello You can catch COM events like this: ; Open a MS Word window before running this script wd := Word_Get() ComObjConnect(wd, new catchComEvents) Return class catchComEvents { __New() { this.info := new infoWindow("x0 y0", "Monitoring COM Events...") } __Call(Name, Params*) { Loop, % Params.MaxInd...
by tmplinshi
06 Sep 2020, 00:59
Forum: Ask For Help
Topic: PSD view?
Replies: 3
Views: 173

Re: PSD view?

DevIL SetWorkingDir %A_ScriptDir% hBitmap := DevIL_FileToHBitmap("test.psd") Gui, Add, Pic, , HBITMAP:%hBitmap% Gui, Show Return ; Requires DevIL.dll, ILU.dll, ILUT.dll ; from http://openil.sourceforge.net/ DevIL_FileToHBitmap(Filename) { hModule := DllCall("LoadLibrary", "str", "DevIL.dll", "ptr")...

Go to advanced search