Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
Witchy2
23 discussion posts
Hi folks,

For years I've had a script running on change of monitor profile that detects what apps are running and starts ones that aren't. I recently had to switch from IE11 to Edge and while I can see how to do this with a trigger (setting window text etc) how can I do it with BFS.Application.Start()?

Cheers

Adrian
May 28, 2019  • #1
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
Hi Adrian, are you having issues detecting whether Edge is running, or having issues starting Edge if it's not running? Thanks!
May 28, 2019  • #2
User Image
Witchy2
23 discussion posts
Hi Jon,

Both I guess. In the past I could just search for the window title and fire off IE as necessary but can't see a way of doing this. I found the executable for Edge but simply running it doesn't appear to be sufficient.

Cheers!
May 28, 2019  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Universal apps are tricky to start from the command line, but you can do this for Edge:

Code

BFS.Application.Start(@"c:\windows\system32\cmd.exe", @"/c start microsoft-edge:");


Hope that helps!
May 29, 2019  • #4
User Image
Witchy2
23 discussion posts
Quote:
Universal apps are tricky to start from the command line, but you can do this for Edge:

Code

BFS.Application.Start(@"c:\windows\system32\cmd.exe", @"/c start microsoft-edge:");


Hope that helps!


Hi Keith,

Excellent, that works directly from cmd too so I'll give it a go. the "@" style syntax is new to me, is that to avoid the need for double-backslash on filenames?

Cheers

A
May 30, 2019  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Yep! The @ makes it a literal string :)
May 30, 2019  • #6
User Image
Witchy2
23 discussion posts
Cool. Is there anything else new in the functions? I can't seem to find the list of them any more. 'Help' just says 'yep, there are functions that you access through the autocomplete'

cheers

A
May 31, 2019  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
This page has a list of pre-made scripts that you can check out: https://www.displayfusion.com/ScriptedFunctions/

There's also a link at the bottom of that page to show all of the available scripting functions: https://www.displayfusion.com/ScriptedFunctions/Help/

Hope that helps!
Jun 5, 2019  • #8
User Image
Witchy2
23 discussion posts
Ah, I hadn't seen that link at the bottom! Cheers Keith.
Jun 6, 2019  • #9
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries! I'm thinking we should move that info to the top since that list is super long now :)
Jun 7, 2019  • #10
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)