Search found 45 matches

by RandomAHKUser
06 Jan 2017, 18:32
Forum: Ask for Help (v1)
Topic: Shell.Explorer poor performance vs IE11 (specifically javascript)
Replies: 0
Views: 498

Shell.Explorer poor performance vs IE11 (specifically javascript)

I have a webpage (in the example, it creates an iframe for realtor.com) I'm displaying via shell.explorer. The fade is slow (and it is throwing script errors). When launching via internet explorer (press I after running the script to open it there), there are no script errors, and the fade is smooth...
by RandomAHKUser
05 Jan 2017, 19:08
Forum: Ask for Help (v1)
Topic: Document.GetElementsByClassName fails only in compiled script Topic is solved
Replies: 1
Views: 659

Re: Document.GetElementsByClassName fails only in compiled script Topic is solved

Well, I found a workaround by looping the parent ElementID to get the right number, then using that ID. strange that both lines of code that access the same element work in the uncompiled version, but only this code will work in the compiled version: IE.Document.GetElementById("frmLogin")[5].Click()...
by RandomAHKUser
05 Jan 2017, 17:55
Forum: Ask for Help (v1)
Topic: Document.GetElementsByClassName fails only in compiled script Topic is solved
Replies: 1
Views: 659

Document.GetElementsByClassName fails only in compiled script Topic is solved

I have a line of code that will click on a JavaScript button. It works properly when invoking the uncompiled ahk with this line: IE.Document.GetElementsByClassName("btn-primary")[0].Click() But when I run the compiled script, I get this error box when the program hits the line of code: Error: 0x8002...
by RandomAHKUser
04 Jan 2017, 12:20
Forum: Ask for Help (v1)
Topic: Fade In Gui, Shell.Explorer does not display contents until after animation
Replies: 1
Views: 693

Re: Fade In Gui, Shell.Explorer does not display contents until after animation

In the alternative, I've found the code to loop a window's transparency to fade in: FadeIn(ID) { FADE := 0 Loop 50 { FADE := FADE + 5 WinSet, Transparent, %FADE%, ahk_ID %ID% if Fade=5 { winshow, ahk_ID %ID% winactivate, ahk_ID %ID% } Sleep, 15 } WinSet, Transparent, 255, ahk_ID %ID% return While th...
by RandomAHKUser
03 Jan 2017, 22:43
Forum: Ask for Help (v1)
Topic: Fade In Gui, Shell.Explorer does not display contents until after animation
Replies: 1
Views: 693

Fade In Gui, Shell.Explorer does not display contents until after animation

Calling the AnimateWindow function will fade in the window, but it will be white until the end of the animation. The actual contents of the window are not displayed until the end. I've tried the While Busy, but then the window stays white. Any Ideas? Gui, WebGui: +hwndActive -Caption Gui, WebGui: Ad...
by RandomAHKUser
11 Aug 2016, 19:40
Forum: Ask for Help (v1)
Topic: How to get current username (non-admin) when running script as Admin? Topic is solved
Replies: 2
Views: 1803

How to get current username (non-admin) when running script as Admin? Topic is solved

I've created an installer that needs to run as Administrator to install certain registry keys and files. I need to get the name of the current logged in user to find the proper current user registry SID, but obviously running as admin will show the current user (A_Username) as the administrator cred...
by RandomAHKUser
04 Aug 2016, 16:44
Forum: Ask for Help (v1)
Topic: Process, Exist not working? Topic is solved
Replies: 4
Views: 1870

Re: Process, Exist not working? Topic is solved

I misunderstood the Process reference. Thanks all for helping me.
by RandomAHKUser
04 Aug 2016, 16:15
Forum: Ask for Help (v1)
Topic: Process, Exist not working? Topic is solved
Replies: 4
Views: 1870

Re: Process, Exist not working? Topic is solved

Yeah, that works, thanks. I wonder why the documentation for Process and Errorlevel only shows "if errorlevel", and doesn't instead show it using an expression syntax, if the documented syntax isn't working.
by RandomAHKUser
04 Aug 2016, 15:07
Forum: Ask for Help (v1)
Topic: Process, Exist not working? Topic is solved
Replies: 4
Views: 1870

Process, Exist not working? Topic is solved

I feel like I'm beating my head against a wall, but I cannot get Process Exist to work. cmd.exe does exist in the task manager (as cmd.exe), but the messagebox always pops up. #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ; #Warn ; Enable warnings to assist ...
by RandomAHKUser
01 Aug 2016, 11:38
Forum: Ask for Help (v1)
Topic: Question: Way to see what user has a file locked?
Replies: 0
Views: 503

Question: Way to see what user has a file locked?

If I open up a DOC document in Word that is locked by another user, it will say the name of the user that has locked the file. Is there a way in AHK to find this information programmatically? I can already check if the file is locked or not by using if !FileOpen(input, "rw") , but is there a way to ...
by RandomAHKUser
27 Jul 2016, 16:22
Forum: Ask for Help (v1)
Topic: Regwrite as admin not working in compiled script Topic is solved
Replies: 1
Views: 795

Re: Regwrite as admin not working in compiled script Topic is solved

Disregard, windows re-routed the compiled entries to the 32bit node (as I compile the exe as 32-bit, not 64-bit), it is working as expected.
by RandomAHKUser
27 Jul 2016, 16:04
Forum: Ask for Help (v1)
Topic: Regwrite as admin not working in compiled script Topic is solved
Replies: 1
Views: 795

Regwrite as admin not working in compiled script Topic is solved

Example: RegWrite, REG_SZ, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Test Uninstall, DisplayName, Test Uninstall Name This key will write when launching the uncompiled AHK as administrator. This key will not write when launching a compiled version of this code as adminis...
by RandomAHKUser
25 Jul 2016, 18:46
Forum: Ask for Help (v1)
Topic: Word Com Object, how to check if file is locked without prompt?
Replies: 2
Views: 1112

Word Com Object, how to check if file is locked without prompt?

If I open a Word document that is already opened, I get a dialog about "File in Use". I have not found a way to suppress this, I've used the try, the DisplayAlerts := False, and the Visible := false commands, none seem to work. If the file is in use, I'd like a variable to increment (such as InUse +...
by RandomAHKUser
22 Jul 2016, 19:02
Forum: Ask for Help (v1)
Topic: Getting SystemAccentColor in Windows 10 Topic is solved
Replies: 9
Views: 3892

Re: Getting SystemAccentColor in Windows 10 Topic is solved

When I run this, anytime I choose a different accent color, it will reflect the difference. Unless your accent colors are pulling from somewhere else. Gui +Alwaysontop Gui, Add, Text, x20 yp+30, BG Color: Gui, Add, Edit, x70 yp-3 w120 h20 vColorChoice, %color% Gui, Add, Button, x20 yp+20 w70 h20 gOK...
by RandomAHKUser
22 Jul 2016, 14:48
Forum: Ask for Help (v1)
Topic: Getting SystemAccentColor in Windows 10 Topic is solved
Replies: 9
Views: 3892

Re: Getting SystemAccentColor in Windows 10 Topic is solved

As in the toolbar color? RegRead, CheckReg, HKCU\SOFTWARE\Microsoft\Windows\DWM, ColorizationColor SetFormat, integer, hex CheckReg := Checkreg+0 StringRight, CheckReg, CheckReg, 6 msgbox % CheckReg This will pull the value from the registry and convert it to hex (standard HTML color notation) for t...
by RandomAHKUser
22 Jul 2016, 14:41
Forum: Ask for Help (v1)
Topic: Remove extra icons from compiled exe?
Replies: 3
Views: 1158

Re: Remove extra icons from compiled exe?

I was hoping to get this done without having to resort to hacking/external tools, but if that's the only way, I'll look into it, thanks.
by RandomAHKUser
22 Jul 2016, 11:09
Forum: Ask for Help (v1)
Topic: Remove extra icons from compiled exe?
Replies: 3
Views: 1158

Remove extra icons from compiled exe?

I'm sure its a simple answer, but when I compile into an exe, besides the icon I choose (the top left is correct), AHK adds standard AHK script icons as options (see picture below) https://s32.postimg.org/63r6dvw9x/snip.png The first image is my icon I chose, but how do I remove/not have ahk2exe add...
by RandomAHKUser
18 Jul 2016, 18:34
Forum: Ask for Help (v1)
Topic: Word Com Object, Open With Specific File Converter Topic is solved
Replies: 6
Views: 1707

Re: Word Com Object, Open With Specific File Converter Topic is solved

kon wrote:Instead of ComObjError(false), use try. And catch the error if it occurs.
I learn something new every day, thank you very much!
by RandomAHKUser
18 Jul 2016, 18:26
Forum: Ask for Help (v1)
Topic: Word Com Object, Open With Specific File Converter Topic is solved
Replies: 6
Views: 1707

Re: Word Com Object, Open With Specific File Converter Topic is solved

Untested Word.Documents.Open(A_LoopFileFullPath,,,,,,,,, Word.FileConverters("WordPerfect6x").OpenFormat) That seems to work, any idea on how to throw an errorlevel if it's the wrong type? AHK throws this com error up Error: 0x800A16A1 - Source: Microsoft Word Description: The file is not the right...
by RandomAHKUser
18 Jul 2016, 18:21
Forum: Ask for Help (v1)
Topic: Word Com Object, Open With Specific File Converter Topic is solved
Replies: 6
Views: 1707

Re: Word Com Object, Open With Specific File Converter Topic is solved

I'm not getting the answer there.

I assume the line I need is something like:

Code: Select all

Word := ComObjCreate("Word.Application")
Word.Documents.Open(Filename:=1.doc, NoEncodingDialog:=0, ReadOnly:=1, Format:=Word.Application.FileConverters(3).OpenFormat)
But it throws an error.

Go to advanced search