Jump to content


Photo

Re: AutoHotkey_L v1.1.08 [GUI fails]


  • Please log in to reply
20 replies to this topic

#1 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 19 July 2012 - 06:40 AM

[Note by Lexikos: Topic split from announcement thread.]


Thanks for the updates :)

For the installer, I keep getting the following 0x80020006 - Unknown name errors:

Specifically: initOptions

Line#
---> 169: w.initOptions(CurrentName, CurrentVersion, CurrentType, ProductVersion, DefaultPath, DefaultStartMenu, DefaultType, A_Is64bitOS)

Specifically: switchPage

Line#
---> 190: w.switchPage("start")


System: Win7 64-bit

#2 Lexikos

Lexikos
  • Administrators
  • 8845 posts

Posted 19 July 2012 - 09:54 PM

jethrow, which version of IE do you have? I have personally tested on:
[*:2j0adxdd]Windows 8 x64 with IE10
[*:2j0adxdd]Windows 7 x64 with IE9
[*:2j0adxdd]Windows Vista x86 with IE7
[*:2j0adxdd]Windows XP x86 with IE8 (iirc)
[*:2j0adxdd]Windows XP x86 with IE6
[*:2j0adxdd]Windows 2000 with IE6
Please try installing with the /S command-line switch, which should be equivalent to a repair install. Once installed, remove the following line from Installer.ahk (in the AutoHotkey directory), then try to run Installer.ahk:
wb.Silent := true
Hopefully it will show a script error message.

initOptions and switchPage are javascript functions, included in the HTML which is written via document.write(). You could also try moving the HTML from the bottom of Installer.ahk to a separate file (Installer.htm) and replacing
wb.Navigate("about:blank")
    while wb.ReadyState != 4
        Sleep 10
    wb.Document.open()
    wb.Document.write(html)
    wb.Document.Close()
with
wb.Navigate(A_ScriptDir "\Installer.htm")
    while wb.ReadyState != 4
        Sleep 10
or try a larger fixed Sleep, or
while wb.ReadyState != 4 || wb.Busy


#3 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 21 July 2012 - 06:30 AM

Sorry, using Windows 7 x64 with IE9. I tried all the above, the only difference is now I'm also getting the error for opt1 too. Installing with /S seemed to work though.

#4 Lexikos

Lexikos
  • Administrators
  • 8845 posts

Posted 21 July 2012 - 08:15 AM

Does the GUI show up? Is it blank?

Installing with /S entirely bypasses the GUI.

#5 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 21 July 2012 - 02:20 PM

Does the GUI show up? Is it blank?

That is correct.

Also, I will not be on the forums for the next week ...

#6 Lexikos

Lexikos
  • Administrators
  • 8845 posts

Posted 21 July 2012 - 11:21 PM

What does it mean for a question or two to be correct? I presume you mean the GUI shows up and is blank. :roll:

In that case, I would try something simpler:
Gui Add, ActiveX, vwb w600 h400 hwndhwb, Shell.Explorer
wb.Navigate("about:blank")
while wb.ReadyState != 4 || wb.Busy
    Sleep 10
wb.Document.write("hello, world!")
Gui Show,, AutoHotkey_L Setup
return
GuiClose:
ExitApp
Gui Add, ActiveX, vwb w600 h400 hwndhwb, Shell.Explorer
wb.Navigate("www.google.com")
Gui Show,, AutoHotkey_L Setup
return
GuiClose:
ExitApp


#7 amnesiac

amnesiac
  • Members
  • 124 posts

Posted 28 July 2012 - 06:54 AM

Will you extract all of the descriptive text in the installer to one configuration file so that it can support multi-languages UI?

#8 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 01 August 2012 - 04:15 AM

I presume you mean the GUI shows up and is blank. :roll:

Yep, yep

In that case, I would try something simpler:

Both those code examples load the HTML as expected.

#9 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 01 August 2012 - 11:10 PM

It may just be my IE - I cannot access any variables in the window object.

#10 Lexikos

Lexikos
  • Administrators
  • 8845 posts

Posted 03 August 2012 - 02:28 AM

I figured it would be something specific to your machine, but unfortunately I think you won't be the last user to have these sort of problems. I'll add fallback behaviour, to provide access to the installation files at the very least, or possibly perform an installation with default options.

Let me know if you figure out the cause of the problem.

I would try resetting IE (usually Tools -> Internet Options -> Advanced -> Reset...).

#11 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 10 August 2012 - 05:22 AM

Still no luck. I'm finding this rather frustrating - it's like my IE9 is set to not allow 3rd-party scripting of the window object & execution of javascript. I cannot execute javascript in the url address bar. wb.navigate("javascript: alert('test')") does nothing, & win.execScript("alert('test')") gives me a com error:

Error: 0x80040154 - Class not registered

Source: (null)
Description: Class not registered


HelpFile: C:\Windows\system32\MSHTML.hlp
HelpContext: 0

Specifically: execScript

ComObjType:
wb = IWebBrowser2
win = IHTMLWindow2


I thought the issue might be the problem discussed in this thread, but accessing the window object by querying for the IHTMLWindow2 interface isn't even working.

#12 Lexikos

Lexikos
  • Administrators
  • 8845 posts

Posted 10 August 2012 - 08:58 AM

I would try removing IE9, testing, reinstalling IE9, and testing.

I cannot execute javascript in the url address bar.

Do you mean that typing javascript: alert('test') into the address bar of a normal IE window doesn't work? If so, I wouldn't expect wb.Navigate() to do any better. Do ordinary scripts in web pages work?

win.execScript("alert('test')") gives me a com error

Where did you get win from? If you've retrieved it with ComObjQuery and there isn't a page loaded yet, it's likely that anything you try to do will fail. At least, that was the result of my attempts to avoid having to load about:blank prior to writing HTML into the control. Similarly, wb.Navigate("javascript:...") won't work if nothing has been loaded into the control.

#13 tank

tank
  • Members
  • 4105 posts

Posted 10 August 2012 - 04:11 PM

I think this was part of some security updates to IE i dont recall dates or the kb. needless to say i have become ever frustrated with browser automation in general. I might add that javascript injection hasnt worked by default in Chrome either for a long while. In IE there are security zone settings that can be changed i think but i am too board of IE to fire it up and look at the settings again right now.

#14 jtkd

jtkd
  • Guests

Posted 11 August 2012 - 05:20 AM

I was experiencing the same symptoms as jethrow running AutoHotkey_L v1.1.8.1 on 32-bit Vista and IE 9 with scripting disabled, temporarily enabling scripting resolved the issue for me.

#15 jethrow

jethrow
  • Fellows
  • 2549 posts

Posted 11 August 2012 - 03:43 PM

I would try removing IE9, testing, reinstalling IE9, and testing.

That worked. For quick reference, IE9 can easily be uninstalled by running this through cmd as the admin:
FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*9.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart"