
ganon64
Members-
Posts
15 -
Joined
-
Last visited
ganon64's Achievements

Seeker (1/7)
0
Reputation
-
Hi all, I was thinking of making a program/script that will effectively do what MSconfig does for startup items but will be used on remote computers (This will save logging onto Networked machines through RDP or VNC and disrupting users working). The way to do this I believe would be to delete/create registry keys in another place which is effectively what msconfig does: It copies values from these: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run and moves them in a different format to here: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\MSConfig\startupreg I just wondered if this was possible with Autoit because I can only see that RegRead works on a Local machine and not remotely through remote registry. Seems a fairly straightforward idea but I don't believe such a program exists at the moment (I checked ).
-
Hi, I am looking to make a script that will change the sound input to "what-u-hear" upon pressing a hotkey. I am not sure how to go about doing this though as there didn't seem to be any useful commands for it in the Autoit helpfile. I was wondering if it may be possible.
-
ignores completely whether a file exists
ganon64 replied to ganon64's topic in AutoIt General Help and Support
nope wait was running some identical file script lol weird, it works just now i got weird other errors hehe here we go -
ignores completely whether a file exists
ganon64 replied to ganon64's topic in AutoIt General Help and Support
thnx turns out i meant to use _FileWriteToLine instead actually not much difference but meh, anyway it still seems to not give me a msg box or anything or create the file like this, as if its ignoring the If FileExists line completely: #include <File.au3> Dim $file = FileOpen("adsettings.txt",0) Dim $ABBYY = FileReadLine($file,1) Dim $username = FileReadLine($file,2) Dim $pw = FileReadLine($file,3) If FileExists("adsettings.txt") = 0 Then MsgBox(0, "Error", "adsettings.txt doesn't exist and has just been created, please add your details to it before running again.") _FileCreate("adsettings.txt") FileOpen("adsettings.txt",2) _FileWriteToLine($file,1,"Directory",1) _FileWriteToLine($file,2,"Username 1",1) _FileWriteToLine($file,3,"Password 1",1) FileClose($file) Exit EndIf FileClose($file) HotKeySet( "{F8}", "paused") HotKeySet( "{F7}", "login") while 1 sleep(100) WEnd Func paused() $status = "paused" while $status = "paused" sleep(100) WEnd EndFunc Func login() $status = "started" -
it just ignores this completely and doesn't msg box or create the new file at all, it should extract variables from a txt document which it does but if this txt document doesn't exist i want it to create the txt document and quit the script so the user can enter the details into the txt document and restart the script. If FileExists("adsettings.txt") = 0 Then MsgBox(0, "Error", "adsettings.txt doesn't exist and has just been created, please add your details to it before running again.") $file = FileOpen("adsettings.txt",2) FileWriteLine($file,1) = "Directory" FileWriteLine($file,2) = "Username 1" FileWriteLine($file,3) = "Password 1" FileClose($file) Exit EndIf Dim $file = FileOpen("adsettings.txt",0) Dim $ABBYY = FileReadLine($file,1) Dim $username = FileReadLine($file,2) Dim $pw = FileReadLine($file,3) FileClose($file) HotKeySet( "{F8}", "paused") HotKeySet( "{F7}", "login") while 1 sleep(100) WEnd Func paused() $status = "paused" while $status = "paused" sleep(100) WEnd EndFunc Func login() $status = "started"
-
since everyones too lazy to answer i finally figured it after several hrs Do Sleep(1000) Until PixelGetColor(118,153) = 9152139 And PixelGetColor(195,246) = 0 main() EndIf Until MouseGetCursor() = 0 And StatusbarGetText("Main Page","",1) = "http://adbux.org/?r=" = @error MouseClick("left")
-
I am making a program that moves the mouse down a webpage by 12 pixels every cycle until the cursor changes to that of when its over a hyperlink, problem is the only way i can get it to break out the loop at a link is only using the mousegetcursor, it seems to ignore the until line when combined with an AND NOT statusbargettext command which is annoying cause i need it to not click on this particular link but only click on the others. Is a NOT statusbargettext command valid? Do MouseMove($xmouse,$ymouse+12) $pos = MouseGetPos() $ymouse = $pos[1] Until MouseGetCursor() = 0 And Not StatusbarGetText("Main Page","",1) = "http://adbux.org/?r=" MouseClick("left")
-
pixel detection (window unfocused)
ganon64 replied to ganon64's topic in AutoIt General Help and Support
i know but i want to be able to pixel detect without the window being on top or focused and like use msn or something whilst its pixel detecting and ctrlsending stuff to the application i am reasonably sure its not possible? -
hi, is pixel detection possible within an application if its window isn't focused?
-
$hor and $vert strange formula
ganon64 replied to ganon64's topic in AutoIt General Help and Support
tried this and it never worked for some reason anyway i solved them equations basically x = 0.5*xres + c where c = x(coord in that res) - (res/2) and the same with y y = 0.5*yres + c where c = y(coord in that res) - (res/2) not tested it yet but it should work in theory to click on a button or wtever in every res once you've measured the coords in one res Hence you'd program $size = WinGetPos("Program") $xpos = ((0.5*$size[2]) + (("Measured X Coord in a res") - $size[2]/2) $ypos = ((0.5*$size[3]) + (("Measured Y Coord in a res") - $size[3]/2) MouseClick("left","$xpos,$ypos,1,0) -
Ok i understand the code but not the equations in bold that make it work, basically i am trying to get a program to click on a button no matter what the resolution the screen is in. Now this is something someone else coded where it works using the equations in bold but only for where they want to click. I wanna mainipulate the equations and use em for coordinates of my choice $size = WinGetPos("Program") $WepPixel=$size[2]-26 if PixelGetColor($WepPixel,224) = 0 Then Send("{x}") EndIf $HammerHor=($size[2]-306)/2+107 $HammerVer=($size[3]-146)/2+112 if PixelGetColor($HammerHor,$HammerVer) = 16710616 Then mouseclick("left",$HammerHor,$HammerVer,1) EndIf if PixelGetColor($WepPixel,224) = 0 Then $ExitHor=$size[2]/2 $ExitVer=($size[3]-210)/2+172
-
pixel detection relative to window size
ganon64 replied to ganon64's topic in AutoIt General Help and Support
hmm help it didn't work kk i programmed it using wingetpos and it worked but only in the one resolution i alrdy made it in(1024x768) and not in other resolutions :/ i did it like this: Dim $size = WinGetPos("SRO_Client") PixelGetColor(705*$size[2]/1024,380*$size[3]/768) = 9862483 where i found the ratio of the cordinates in 1024x768 and multiplied them by the screen size (hence resolution) however it seems this is not how it works when u change the resolution of a screen it doesn't stretch proportionally like i thought, any ideas? -
pixel detection relative to window size
ganon64 replied to ganon64's topic in AutoIt General Help and Support
right so they'd be used in calculations for coordinates i guess hmm i see hmm just found a better way using wingetpos should work -
Hi, is there a way to pixel detect and move the mouse to coordinates relative to the window size so that a script may work on all resolutions without manually changing all the coordinates for every resolution :/ If not maybe some sneaky formula to find coords from one resolution to another, save me adding coordinates for each one
-
So i just started to learn this, but one thing i found is the only way u can read the keyboard as to what key the user just pressed and then act upon it is to use hotkeys? I wondered if there was another way of doing this cause its a pain to have to put each key dependent piece of code in a separate function especially when i wanna embed a key dependent IF statment inside another function. Also is their someway u can enable and disable hotkey detection via a line of code?