Sorrylol
42 discussion posts
Hey there, I was wondering if anyone knew of a way to create a function that basically when executed acts as: if monitor profile 1 = true, then do ‘x’ action, if monitor profile 2 = true, then do ‘y’ action, if monitor profile 3 = true, then do ‘z’ action’. Basically, one function that depending on which monitor profile I am in, executes a certain command. For example, if current monitor profile = ‘1920’ then execute windows position profile entitled ‘1920x’, or if current monitor profile = ‘5760’ then with the same function, execute windows position profile entitled ‘5760’. Also is there any way to run another function, through this? For example, if current monitor profile = ‘1920’, then run “abc” custom function, or if current monitor profile = ‘5760’, then run ‘def’ custom function. Any input regarding this would be much appreciated, just thought of this as a way to cut down on hotkeys, instead of having like 3 or 4 depending on which monitor profile I am currently in, if it were possible to consolidate it all into one function with one hotkey that acts accordingly depending on which profile I am currently in.
Sorrylol
42 discussion posts
or instead of having it based off of current monitor profile, does anyone know of a way to reference the primary display/monitor resolution somehow? so if primary display resolution = "1920x1080" do 'x' function, or if primary display resolution = "1440x1080" do 'y' function
Sorrylol
42 discussion posts
Hello Keith, thank you for the reply, I just tried the code, and I get an error when trying to specify the current monitor profile, "Cannot implicitly convert type 'string' to 'bool'", any idea on how to fix this possibly? thanks again tremendously.
Sorrylol
42 discussion posts
turns out it needed 2 equal signs like this to work, "(currentMonitorProfile == "1920")".
thank again! works great.