Title

Message

Confirm

<< DiscussionsReply

Closing Window/Application

Mrrellim69
7 discussion posts
I have a program that needs to load on Windows startup to populate a registration key. The only problem is that a window opens to say the the key has been registered but the window stays open until I click "Ok"
I can't figure out how to get create a trigger to close the window automatically when it opens.
any help would be appreciated.
22 days ago  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

What program launches that confirmation window? Could you send over a screenshot of the window?

Thanks!
18 days ago  • #2
Mrrellim69
7 discussion posts
I have attached a screen shot of the window and the trigger I have enabled.
The program is PDF-Xchange Vault.
Thanks
• Attachment [protected]: PDF Vault window.JPG [16,704 bytes]
• Attachment [protected]: PDF Window Trigger.JPG [59,478 bytes]
17 days ago  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Thanks for sending that over. Let's make sure the trigger is actually grabbing that window itself.

Is that minimize action doing anything to the window? If you try using the "Move window to specific size and location" action to move the window, does that work?

Thanks!
17 days ago  • #4
Mrrellim69
7 discussion posts
Right now the trigger is grabbing the window and minimizing it to the system tray. If possible I would like to have the trigger completely close the window rather than minimize to the system tray.
17 days ago  • #5
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

If you create a scripted function in DisplayFusion and add this line:

BFS.Window.Close(windowHandle);

You can then call that function in the action pane of your trigger, and it should close that window out.

Hope that helps!
17 days ago  • #6
Mrrellim69
7 discussion posts
I removed the "minimize window to system tray" run function.
Then for the scripted function I tried both using C# and Visual basic. I enter the code line and click "Verify Function" and it says "Verify Successful".
I then click "ok", "Ok" and then "apply".
When I open the program the window just stays in the middle of the screen.
17 days ago  • #7
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

After you created the scripted function, did you go back to your trigger and use the "Run Function" action, and then select the scripted function you created?

Thanks!
17 days ago  • #8
Mrrellim69
7 discussion posts
Sorry, yes I did do that.
I have added a video of me creating the scripted function.
17 days ago  • #9
Mrrellim69
7 discussion posts
Yes I did.
I have added a video of me creating the scripted function.
• Attachment [protected]: Window Trigger.webm [25,239,609 bytes]
17 days ago  • #10
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hello,

Ah, you'll want to take out the two front slashes before that line, as those cause your code to be commented out. The full script should look like this:

Code

17 days ago  • #11
Mrrellim69
7 discussion posts
Thank you that works great!!
17 days ago  • #12
Was this helpful?    
<< DiscussionsReply