B
blackneos940
Guest
*Throws C Code at your face.* :3
Basically, as you can see, like the Terminal, the system() Function is used to, well, run Redshift..... I know most of you guys don't run Windows, but, since Redshift on the Linux Terminal probably takes the same Arguments, I think maybe you can see where I'm heading with this Program..... My problem is this: It won't run Redshift this way, though in CMD and Powershell, these same Commands DO work..... :\ Also, in an earlier version of the Program, I passed in "bash" to the system() Function, just to see if it DID register, and..... It did..... Why, oh why, won't it call up Redshift though.....? :'( I wrote this Program so I could automate the Color Temp calibration easier..... Also, there's a Hurricane coming through the East Coast..... Better get this question out there before I lose all Internet.....! :O Thanks for any help, guys!..... ^^ *The Admins look on with dismay, as blackneos940's Topic is created on their Server, taking up yet more space. Arochester sighs, and changes blackneos' Profile name to Gimpy.*
Code:
/*This Program is released under the GNU GPL Version 2, or, at your option, any later version. See https://www.gnu.org/licenses/gpl-2.0.html for more details. However, I will condense it for you. You can modify this Program HOWEVER you want. You are encouraged to share it with others. There's more to this License, but that's the crux of it.*/
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int main(void)
{
printf ("Welcome to the bastardized wannabe GUI for Redshift on Windows!\nSelect from 1-6, to adjust the Color Temperature. (Hint: The more Red it is, the easier it will be on your Eyes at Night [or if you've stayed up all night and it's day]. Y'know, those balls in your Head? Yeah, don't be a a Sociopath to them. [Make it TOO Red, however, and you'll be seeing... Red. But you just might like it.]) Also, Blue Moon is SO Blue, it'll have you downing a bottle of Aspirin pretty quickly. But hey, at least you won't feel anything anymore..... Isn't that what you wanted, Senpai?\n\n1: Red Moon\n2: Ember\n3: Salmon\n4: Diabetic Blood\n5: Day\n6: Blue Moon\n>>>");
int choice;
choice = scanf("Pick a Number.", &choice);
if (choice == 1)
system("redshift -O 1000k");
if (choice == 2)
system("redshift -O 1200k");
if (choice == 3)
system("redshift -O 1360k");
if (choice == 4)
system("redshift -O 1700k");
if (choice == 5)
system("redshift -O 6500k");
if (choice == 6)
system("redshift -O 25000k");
return 0;
}
Basically, as you can see, like the Terminal, the system() Function is used to, well, run Redshift..... I know most of you guys don't run Windows, but, since Redshift on the Linux Terminal probably takes the same Arguments, I think maybe you can see where I'm heading with this Program..... My problem is this: It won't run Redshift this way, though in CMD and Powershell, these same Commands DO work..... :\ Also, in an earlier version of the Program, I passed in "bash" to the system() Function, just to see if it DID register, and..... It did..... Why, oh why, won't it call up Redshift though.....? :'( I wrote this Program so I could automate the Color Temp calibration easier..... Also, there's a Hurricane coming through the East Coast..... Better get this question out there before I lose all Internet.....! :O Thanks for any help, guys!..... ^^ *The Admins look on with dismay, as blackneos940's Topic is created on their Server, taking up yet more space. Arochester sighs, and changes blackneos' Profile name to Gimpy.*