Search found 1602 matches

by tmplinshi
22 Feb 2022, 03:50
Forum: Ask for Help (v1)
Topic: Powershell script or AHK
Replies: 4
Views: 2164

Re: Powershell script or AHK

Code: Select all

code =
(Join;
echo hello
pause
)

cmd = powershell Start-Process powershell -ArgumentList "``-Command,{%code%}" -Verb runAs
Run, %cmd%,, Hide

Code: Select all

code =
(
echo hello
pause
)

Run, *RunAs "powershell" -Command "&{%code%}"
by tmplinshi
21 Feb 2022, 04:22
Forum: Ask for Help (v1)
Topic: Send Excel File over Discord
Replies: 3
Views: 769

Re: Send Excel File over Discord

Hi,

I guess you wrote something like this:
objParam := { "file": "C:\test.xlsx" }
It should be:
objParam := { "file": ["C:\test.xlsx"] }
by tmplinshi
20 Feb 2022, 04:28
Forum: Ask for Help (v1)
Topic: [Problem] Custom Checkbox/Switch Class - IniFile
Replies: 6
Views: 807

Re: [Problem] Custom Checkbox/Switch Class - IniFile

In the CustomSlider class, when this.pos := v is executed, it actually triggers the property definition : pos[pgW := "", pgX := ""] { set { GuiControl,, % this.hProg, % value But there is no such one in your class, so nothing happends when you assign This.State . So you can write a property definiti...
by tmplinshi
31 Jul 2021, 03:22
Forum: Ask for Help (v1)
Topic: Problem With Slider - IniFile Topic is solved
Replies: 20
Views: 2226

Re: Problem With Slider - IniFile Topic is solved

Hello, The hBitmap was deleted by the line: Gui, Add, Pic, yp x%x% w8 h24 HWNDhBtn, % "HBITMAP:" hBitmap_thumb Appending a * can prevent it: % "HBITMAP: * " hBitmap_thumb hBitmap := Create_sliderthumb_png() Gui, Color, 0x282D41 Min := new CustomSlider("x10 y20 w400 h3 BackGround0x454C5F c0x66CCFF al...
by tmplinshi
07 Dec 2020, 01:30
Forum: Ask for Help (v1)
Topic: Control transparency of elements on a GUI Topic is solved
Replies: 3
Views: 1107

Re: Control transparency of elements on a GUI Topic is solved

You can use WinSet, Transparent

Code: Select all

Gui, Add, Picture, HWNDhPic, % A_AhkPath
Gui, Add, Slider, w300 Range0-255 ToolTip vTransVal gChangeTransparency, 255
Gui, Show
Return

ChangeTransparency:
	GuiControlGet, TransVal
	WinSet, Transparent, %TransVal%, ahk_id %hPic%
Return

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

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: 14
Views: 13509

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 (v1)
Topic: PS1 script to AHK
Replies: 16
Views: 1823

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 (v1)
Topic: PS1 script to AHK
Replies: 16
Views: 1823

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: 1731

[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 (v1)
Topic: PS1 script to AHK
Replies: 16
Views: 1823

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 (v1)
Topic: How can I set an edit control to be Latin-only? Topic is solved
Replies: 4
Views: 557

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 (v1)
Topic: Uploading image link to Imgur Topic is solved
Replies: 13
Views: 3286

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 (v1)
Topic: Uploading image link to Imgur Topic is solved
Replies: 13
Views: 3286

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 Topic is solved
Replies: 2
Views: 1158

Re: Add ahk_hwnd to work with hidden windows Topic is solved

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 Topic is solved
Replies: 2
Views: 1158

Add ahk_hwnd to work with hidden windows Topic is solved

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: 31952

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: 31952

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

Go to advanced search