Search found 1602 matches

by tmplinshi
10 Sep 2020, 08:45
Forum: Scripts and Functions (v1)
Topic: GuiShow() with MonitorN option supported
Replies: 3
Views: 777

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 (v1)
Topic: transparent windows in screen-shots
Replies: 19
Views: 3413

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 (v1)
Topic: AHK Gui - Redrawing the screen
Replies: 4
Views: 419

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 (v1)
Topic: Catching the context in MS Word
Replies: 3
Views: 439

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 (v1)
Topic: PSD view?
Replies: 3
Views: 580

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")...
by tmplinshi
31 Aug 2020, 06:29
Forum: Ask for Help (v1)
Topic: how to create this text "REC" in a GUI
Replies: 16
Views: 4156

Re: how to create this text "REC" in a GUI

You can copy unicode symbos as they are, e.g.: ⏵⏸⏹⏪⏩⏮⏭ But if you copied a webdings symbo, it becomes numbers or something else, you'll need to use webdings font to display it correctly. See http://www.alanwood.net/demos/webdings.html for a list of Webdings character. Gui, Font, s40, arial Gui, Add,...
by tmplinshi
31 Aug 2020, 00:34
Forum: Ask for Help (v1)
Topic: RegExReplace Question Topic is solved
Replies: 2
Views: 360

Re: RegExReplace Question Topic is solved

Code: Select all

clipboard := RegExReplace(clipboard, "(?!.*THE LATEST)(?<=`n`n)(?=\w)", ">> ")
by tmplinshi
30 Aug 2020, 12:02
Forum: Ask for Help (v1)
Topic: HTML DOM
Replies: 42
Views: 3620

Re: HTML DOM

Thanks teadrinker, it works! So IE=9 is the key. I always use <!doctype html><meta http-equiv=""X-UA-Compatible"" content=""IE=edge""> which didn't work.
by tmplinshi
30 Aug 2020, 11:43
Forum: Ask for Help (v1)
Topic: Ahk Gui slider colors?
Replies: 1
Views: 857

Re: Ahk Gui slider colors?

Not sure if this is helpful. This script uses an image file as the slider thumb button. sliderthumb.png screenshot.png Gui, Color, 0x282D41 hBitmap := Create_sliderthumb_png() ; hBitmap := LoadPicture("sliderthumb.png") slider := new CustomSlider("y20 w400 h3 BackGround0x454C5F c0x2666B5", 20, hBitm...
by tmplinshi
30 Aug 2020, 09:50
Forum: Ask for Help (v1)
Topic: RegEx help
Replies: 2
Views: 206

Re: RegEx help

Code: Select all

ff := "https://m.imdb.com/title/tt0217869/plotsummary"
MsgBox % imdbURL := RegExReplace(ff, "/[^/]+$")

RegExMatch(ff, ".*?/tt[^/]+", imdbURL)
MsgBox % imdbURL

RegExMatch(ff, ".*(?=/)", imdbURL)
MsgBox % imdbURL
by tmplinshi
30 Aug 2020, 09:22
Forum: Ask for Help (v1)
Topic: HTML DOM
Replies: 42
Views: 3620

Re: HTML DOM

That's not the correct way to do it. You can't remove the ! operator, if you want to do that, then removing the whole while block is more safer. ... while (oDocument.readyState = "Complete") Sleep, 10 ;Imdb_url------------------------------------------------------------- x1 := oDocument.getElementsB...
by tmplinshi
30 Aug 2020, 08:12
Forum: Ask for Help (v1)
Topic: HTML DOM
Replies: 42
Views: 3620

Re: HTML DOM

Lucky you get 2. But I get 1. So if you're writting scirpt for me, you may spend half days wondering why I got 1 :D. This happened to me a few days ago where I had to debug a large script, and finally found this reason.
by tmplinshi
30 Aug 2020, 07:36
Forum: Ask for Help (v1)
Topic: HTML DOM
Replies: 42
Views: 3620

Re: HTML DOM

It's important to wait the document ready, before reading DOM. For example: ; error example doc := ComObjCreate("HTMLFile") doc.open() doc.write("<div><script src='/js/1.js'></script></div><div></div>") doc.close() msgbox % doc.all.tags("div").length ; you probably get 1, but it should be 2 ; let's ...
by tmplinshi
28 Aug 2020, 10:04
Forum: Ask for Help (v1)
Topic: Custom progress bar Topic is solved
Replies: 14
Views: 4089

Re: Custom progress bar Topic is solved

You're welcome, colmik. If I encounter any ahk problem, the first thing I usually do is to Google this fourm, it can solve the problem very quickly. For example on this question you have, I would search site:autohotkey.com guicontrol multiple gui , as you can see, the first result is exactly what yo...
by tmplinshi
26 Aug 2020, 09:40
Forum: Scripts and Functions (v1)
Topic: EnableIeDpi - Enable DPI for Shell.Explorer control
Replies: 5
Views: 1229

Re: EnableIeDpi - Enable DPI for Shell.Explorer control

Hi @SKAN, I've fixed it, by replacing wb.navigate("about:blank") to wb.navigate("about:<!DOCTYPE html><meta http-equiv='X-UA-Compatible' content='IE=edge'>"). FixIE() can also fix the error.

Thanks @kczx3, updated.
by tmplinshi
26 Aug 2020, 08:24
Forum: Ask for Help (v1)
Topic: Custom progress bar Topic is solved
Replies: 14
Views: 4089

Re: Custom progress bar Topic is solved

Add a gui name to the progress bar GUI: Gui, Destroy ; this gui has served its purpose, and has set its variables as desired. ; ================================================================================================ ; Gui, pg: new Then you change the progress value like this: GuiControl, pg...
by tmplinshi
24 Aug 2020, 00:06
Forum: Scripts and Functions (v1)
Topic: [Class] ImageButton - 1.5.00.00 - 20201230
Replies: 190
Views: 101903

Re: [Class] ImageButton

I found that ControlSetText, , , ahk_id %HWND% at Class_ImageButton.ahk#L457 is one of the reasons that slows down this class. To fix it, you can add SetControlDelay, -1 before it, or replace it with GuiControl,, %HWND% . Another reason, is the repeated execution of GdiplusStartup/GdiplusShutdown th...
by tmplinshi
23 Aug 2020, 12:49
Forum: Scripts and Functions (v1)
Topic: EnableIeDpi - Enable DPI for Shell.Explorer control
Replies: 5
Views: 1229

EnableIeDpi - Enable DPI for Shell.Explorer control

EnableIeDpi(bEnable := true, exeName := "") { if (exeName = "") exeName := A_IsCompiled ? A_ScriptName : RegExReplace(A_AhkPath, ".*\\") keyName := "HKCU\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_96DPI_PIXEL" RegRead, v, %keyName%, %exeName% if (v != bEnable) RegWrite, REG_DW...
by tmplinshi
23 Aug 2020, 06:31
Forum: Ask for Help (v1)
Topic: how to create this text "REC" in a GUI
Replies: 16
Views: 4156

Re: how to create this text "REC" in a GUI

Change it to: Sleep, 5000 ; disappear after 5 seconds SetTimer, ShowHideDot, Off Gui, Destroy Or use this function instead: DisplayREC() ; Display 5 seconds, and wait.. DisplayREC(3, false) ; Display 3 seconds, and continue running the code below MsgBox return DisplayREC(Seconds := 5, Wait := true) ...

Go to advanced search