Search found 34 matches

by Aurelain
26 Jun 2019, 17:32
Forum: Ask For Help
Topic: GdipCreateBitmapFromDirectDrawSurface or other ways to handle DDS
Replies: 0
Views: 312

GdipCreateBitmapFromDirectDrawSurface or other ways to handle DDS

I built a tool that extracts the assets from "Heroes of Might & Magic III - HD Edition": https://github.com/Aurelain/H3Lens/blob/master/unpack/unpak.ahk It works fine, but I'd like to optimize its handling of DDS textures and I need your advice. Here's the current workflow: 1. PAK file --> RawRead -...
by Aurelain
24 Nov 2016, 20:01
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

lexikos wrote:I've had success using the WebBrowser control's TitleChange event to inject APIs.
Indeed, your method is better.
But in my tests I noticed that NavigateComplete2 is also run before any other scrips. I think I will incorporate like this, as it feels more natural.
by Aurelain
24 Nov 2016, 03:12
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

We're getting there. Write your path as file:///C:/x/y/z/simple.html , not C:\x\y\z\simple.html . I don't know exactly why this makes a difference, but it does. Use a different delaying strategy: window.onload=function(){ setTimeout(function(){ $('#compare').mergely({ cmsettings: { readOnly: false }...
by Aurelain
23 Nov 2016, 14:21
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

The best way for you is to edit Exo directly: download Exo and unpack it in your folder (i.e. "examples") edit Exo.ahk like this: comment out lines 25 , 137 , 153 , 240 replace line 134 with wb.Navigate("file:///C:/x/y/z/simple.html") edit simple.html like this: replace the $(document).ready with a ...
by Aurelain
23 Nov 2016, 04:18
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

It works if you do it like this: Create a js file in the examples folder. Paste the following code there: Require('jquery.min.js'); Require('../lib/codemirror.js'); Require('../lib/mergely.js'); document.body.insertAdjacentHTML('beforeend', '' + '<link type="text/css" rel="stylesheet" href="../lib/c...
by Aurelain
03 Mar 2016, 03:14
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

I've been using Exo quite a lot. I didn't yet use it's UI capabilities (actually displaying a webpage, maybe combining it with Windows UI controls as overlay), but I'm getting there. I edit the JS with WebStorm IDE, and it can't resolve the Exo/AHK variables. So I just place a js file in the project...
by Aurelain
11 May 2015, 14:35
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Changelog v0.97

Changelog v0.97:
  • Implemented a WebBrowser patch to allow the keydown and keyup events in JS
  • A_ScriptDir, A_ScriptFullPath and A_ScriptName now return the location of the JS file
  • Removed padding around the WebBrowser element
by Aurelain
11 May 2015, 02:51
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

Thanks, Lexikos and Coco . I'll soon commit an Exo update that incorporates the keyboard-support patch. Your suggestions worked, both for "keydown" (0x100) and "keyup" (0x101). I'm thinking of going with Coco's function, but I dont' understand the extra checks that are performed there... "oleacc\Acc...
by Aurelain
08 May 2015, 09:21
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

I'm using Exo quite a lot these days :). I encountered some issues with the keyboard events, perhaps related to the ActiveX control: window.addEventListener('keydown', function(){alert('keydown');}); // does NOT trigger window.addEventListener('keypress', function(){alert('keypress');}); // works, b...
by Aurelain
10 Jan 2015, 16:30
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

one can do interactive Exo programming from cmd (similar to other programming languages). That's exactly my point. Can you achieve anything actually useful from the CLI? If the actions I want to take are of any importance, I'll "group" them in a js/ahk file... Don't get me wrong, I enjoy the CLI, b...
by Aurelain
10 Jan 2015, 15:41
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

@Coco: An interesting idea. The interactive CLI seems like a good fit for the "no-js-provided" situation. But my main issue with the CLI is that, although it's very fun, I can't imagine actually using it for useful work. For example, I almost never use the JS command-line feature of the browser's co...
by Aurelain
10 Jan 2015, 14:03
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

No, Exo just allows you to write your local AHK app in JavaScript instead of AhkScript. Now, if I were hard pressed to think of a way in which users could just visit a webpage that runs Exo commands... You would need daemon on the user's computer that waits for the Exo-enriched webpages When such a ...
by Aurelain
10 Jan 2015, 10:32
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

Your experiments are quite nice :). They've lead me on an interesting path... How about a CLI in HTML? I present you with a basic Console: var win = window.open('about:blank','','width=800,height=200'); win.document.title = 'Console'; var output = win.document.createElement('div'); output.style.cssT...
by Aurelain
02 Jan 2015, 18:14
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

Thanks, Coco . I've implemented the FileOpen function using your proposal. Relevant code: lib/API.ahk#L380 lib/FileObject.ahk#L30 I'm not very familiar with the modern features of AHK, but I think it works properly. P.S. I couldn't get RawWrite to accept a variadic call (unknown reasons, maybe I was...
by Aurelain
02 Jan 2015, 09:39
Forum: Bug Reports
Topic: Race conditions with ActiveX
Replies: 4
Views: 1608

Re: Race conditions with ActiveX

Thanks, Lexikos, your research helped me find a workaround for my issues.
Basically, as you said, we should always wait for the ReadyState.

It felt like a bug in AutoHotkey because you would expect the Sleep to really freeze any code below it.
by Aurelain
02 Jan 2015, 09:29
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

New release

Most of the issues discussed in this thread have been fixed/implemented in the latest release . Changelog v0.95: Major restructure of the JS-AHK communication. It is now much more direct (and presumably faster) since it uses the new features of AutoHotkey v1.1.17.01 . Major restructure of the HTML h...
by Aurelain
01 Jan 2015, 14:58
Forum: Bug Reports
Topic: Race conditions with ActiveX
Replies: 4
Views: 1608

Race conditions with ActiveX

This may not be a bug, but maybe someone can clear this up for me. Consider the following script: #SingleInstance Force inside := "var t=t?t:Date.now(); var log=log?log:''; log+='inside='+(Date.now()-t)+'\n';" outside := "var t=t?t:Date.now(); var log=log?log:''; log+='outside='+(Date.now()-t)+'\n';...
by Aurelain
01 Jan 2015, 11:20
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

Wouldn't <base> also allow relative paths? Lexikos is talking about the <base> tag. Yes, I've tested it, it works. Thanks :). If onload doesn't fire, you could always fire it yourself, if needed, but I don't see why it would be. I couldn't find a way to manually trigger the load event in IE8. But i...
by Aurelain
31 Dec 2014, 02:11
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

Nice find. Unfortunately, the new release will use an actual html file, for the reasons in the following excerpt: /* The HTML code must be hosted by a local file (file://), not by "about:blank". Reasons: ● "window.onload()" will work in JS. ● Allows relative paths in HTML src attributes (for <img/>,...
by Aurelain
30 Dec 2014, 06:06
Forum: Scripts and Functions
Topic: Exo: JavaScript unleashed!
Replies: 87
Views: 30838

Re: Exo: JavaScript unleashed!

It would appear that the JS Object method, Object.defineProperty() , was implemented in IE 8+ with a limited scope -- to DOM Objects only. I have good news. "window" is a DOM object, and it should work in IE8. Why did it not work in your case? Because the page was running in compatibility mode ( ab...

Go to advanced search