It is currently May 3rd, 2024, 8:50 am
Help with AutoIt?, Laptop Brightness Control (SOLVED)
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Help with AutoIt?, Laptop Brightness Control (SOLVED)
Is there a plugin or bang that can brighten or dim the laptop screen brightness like the "Fn+F6/F7"(on my laptop) keys? Is it possible to set a bang to keystrokes? For example: set it so it presses (Fn + F6) for me? Or am I dreaming too much
Last edited by UnforgivenRevival on June 18th, 2012, 12:32 am, edited 2 times in total.
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Laptop Brightness Control
Okay Ive done some research on this and it seems to be possible through autoit and nircmd.exe... I managed to get it to work through that but I cannot figure out how to make the window appear minimized instead of popping up the "cmd prompt" window on my desktop when I activate it. Feel free to move this posting, But can someone please help? VERY new to this coding language.
It also seems that the typing section takes a long time (about 1 second) before the command is fully executed. Any way to speed that up?
That is the autoedit code that Ive been using.
It also seems that the typing section takes a long time (about 1 second) before the command is fully executed. Any way to speed that up?
That is the autoedit code that Ive been using.
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: Help with AutoIt?, Laptop Brightness Control
I think you can send these nircmd.exe parameters through Rainmeter itself, without the use of an external cmd window. Try this:
Executing an external application is done by using the !Execute bang and a space, followed by the command and any parameters inside of square brackets:
LeftMouseUpAction=!Execute ["C:\Windows\Notepad.exe" "FileToOpen.txt"]
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Help with AutoIt?, Laptop Brightness Control
Yes that can open the cmd.exe file, But cannot "auto-type" the "nircmd.exe setbrightness 100 {enter}" line in cmd.exe like AutoIt does.
-
- Posts: 608
- Joined: February 7th, 2011, 7:27 pm
- Location: Thessaloniki, GR
Re: Help with AutoIt?, Laptop Brightness Control
What I meant is that you should use that !bang to send the "nircmd.exe" command directly, with it's parameters, not the "cmd.exe" one.
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Help with AutoIt?, Laptop Brightness Control
The problem is you have to be in command prompt to send the "action(setbrightness 100)" to nircmd.exe. Simply executing nircmd.exe and trying to give it an "action" in the !bang doesnt work. you have to physically type in "nircmd.exe setbrightness 100" into command prompt to execute properly. I tried it the way that was suggested, But it doesnt seem to work that way. the nircmd program, if opened through a rainmeter !bang, flashes a window on the screen and quickly disappears because its not getting its "action." That is why I was working with the AutoIt Program along with nircmd.exe, or I wouldnt even need AutoIt.
-
- Moderator
- Posts: 1931
- Joined: January 29th, 2010, 1:43 am
- Location: Willmar, MN
Re: Help with AutoIt?, Laptop Brightness Control
The bang should be formatted as
LeftMouseUpAction=!Execute ["nircmd.exe" setbrightness 100]
Don't forget to define the full path where nircmd is stored.
LeftMouseUpAction=!Execute ["nircmd.exe" setbrightness 100]
Don't forget to define the full path where nircmd is stored.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Help with AutoIt?, Laptop Brightness Control
Ill try that. I tried it as !execute ["nircmd.exe" "setbrightness 100"]
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Help with AutoIt?, Laptop Brightness Control
Still doesnt work that way. Idk why its not. Specified full path and everything.
-
- Posts: 310
- Joined: June 7th, 2012, 2:25 am
- Location: Philadelphia, PA
Re: Help with AutoIt?, Laptop Brightness Control
oh wow it works without the full path for some reason. as long as its !execute["nircmd.exe" setbrightness whatever], it works. thankyou very much for the help!