Jump to content

SleepyXtreme

Active Members
  • Posts

    194
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SleepyXtreme's Achievements

Prodigy

Prodigy (4/7)

1

Reputation

  1. WinGetProcess is what i was looking for but it only covers the first question. From what you guys gave me, I think i found what i was looking for I'm working on a script to hide all the windows associated with a certain process. Here's what I have so far: Global $processList[4] $processList[0] = 4 $processList[1] = "winword.exe" $processList[2] = "firefox.exe" $processList[3] = "notepad.exe" Func ToggleHideProcess() ; Hides the windows associated with a process from processlist For $y = 1 To $processList[0] $WindowList = getWindowsFromProcess($processList[$y]) If $WindowList <> 0 Then For $x = 1 To $WindowList[0][0] hideWindow($WindowList[$x][0]) Next EndIf Next EndFunc ;==>ToggleHideProcess Func getWindowsFromProcess($Process) $wArray = _WinAPI_EnumProcessWindows(ProcessExists($Process), True) If @error Then Return 0 Else Return $wArray EndIf EndFunc ;==>getWindowFromProcess Func hideWindow($windowHandle) WinSetState($windowHandle, "", @SW_HIDE) EndFunc ;==>hideWindow
  2. hi, I've been using auto it for years but I'm a little stumped. I'm trying to find a short and sweet way to get the windows associated with a process and find out what process is associated with a window. ideally I'd like functions like: $process = "Firefox.exe" $windowHandle = [some window handle ] GetProcessFromWindowHandle($windowHandle) (returns the name of a process) GetWindowHandlesFromProcess($process) (returns an array with a list of all the windows associated with the process) any ideas? preferably something with a small Big O (ie not searching every open process or window, so maybe some api function or built in function I'm probably missing or something else)
  3. I think you use return to get out of a function
  4. you can do ProcessClose("notepad.exe") $PID = ProcessExists("notepad.exe") ; Will return the PID or 0 if the process isn't found. If $PID Then ProcessClose($PID) just type in the name of the process in quotes
  5. ok well I found a few components: _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile($fname) $iX = _GDIPlus_ImageGetWidth($hImage) $iY = _GDIPlus_ImageGetHeight($hImage) this will set my starting values however, i'm in still in search of how to loop through all of the pixels and edit/examine each individual pixel.
  6. Hi, i've worked with autoit for quite some time and for some reason i cannot figure out how to do what i'm trying to do: I want to do the following: 1. OpenDialog and pick an image.(knew this already ) 2. Load all of the pixels of that Image into an Array to work with in a loop. ie. $image = FileOpenDialog() PixelWidth = getWidth( $image) PixelHeight = getHeight( $image) For x to PixelWidth For y to PixelHeight $var = getPixel[x][y] ($var is now = to a pixel ) $blue= getBlue($var) $green = getGreen($var) $red = getRed($var) setBlue(255 - $blue) setRed(255 - $red) setGreen(255 - $green) I also want to get the red, green, and blue values of each pixel and be able to change them. i've written things like this in other languages but i'm stumped on how to do it in autoitscript. any ideas?
  7. Hi, so I haven't fooled around with this for a long time and after taking some computer science classes I decided I wanted to completely redo the entire project because it was written so poorly. I have tried to condense as much as possible and implement better code with more functions to prevent and isolate potentially huge problems. I'm also posting the source code b/c i'm more interested in my coding technique than anything else. So here's the INFO: Name: Andrew's Anti-Snooping Program Purpose: To hide windows instantly with other supporting features Features: Set Hotkeys Exceptions - Hide all the windows except the names listed Groups - Hide only the windows with names listed Stealth - hide tray icon when activated Disable All sound Disable Music Only Right Click X to hide window Game Mode (Minimizes so fullscreen games get hidden) Freeze (Hides all the windows, takes a screenshot, splashes the screenshot and waits until Toggle Off is activated; this simulates a frozen computer (before toggle Off) because when you click it beeps and everything is unresponsive.) UPDATE #1: I worked on keeping windows hidden which is slightly slow unhiding but is flawless in that you will not lose a window. It takes up very few system resources which was very surprising. I also added Computer Crash, which will simulate a BSOD. Also, I added a help with a built in laydown of everything.. Note: I'm almost 100% sure you will NEVER lose a window unlike before. I came up with a pretty good idea, you can check it out in the source, let me know what you think. Credits: RobSaunders for Hotkeys I included a few other files that I'm not sure who to give credit too. Let me know if you want credit if I used some of your code. Andrew_s_Anti_Snooping_Tool.au3 Andrew_s_Anti_Snooping_Tool.exe
  8. Ahhh I figured it out. I am calling this function multiple times but i wanted it to search through a list of strings to match one and I didn't catch my return false error. therefore, i moved the return false after the for loop. Thanks a lot I was mind boggled.
  9. Hi, i've worked with auto it for some time but i'm at a loss for words at the moment i have a very simple for statement and yet it will not increment, i've tested it extensively For $x = 1 To 3 Step 1 ConsoleWrite($x) If StringInStr($title, $Groups[$x],2) <> 0 Then Return False Else Return True EndIf Next the console writes 111111111 meaning it isn't incrementing from 1 to 3. i've tried msg box and a whole bunch of other tests with no luck let me know if anyone has any ideas
  10. Hi. Right now trying to create a program that will cross reference the Artist with the Song and come up with the Album the song was in. Then I want it to input that Album cover and Album into itunes under the correct songs. The problem I have is that I have 10,000+ songs that have correct artist and title information but no album. Itunes being useless doesn't figure out the album and display the artwork when you click get album artwork. I found a really good program that has a great database, Last.fm (http://www.last.fm). It links to your itunes library and when you play a song, it does all the work for you and tells you everything about the song, including the album with the artwork in the program window. However, for some odd reason, i can't drag the image over into itunes (that would make my scripting life way to simple). So here's my start. Normally, i would sit through and do it manually but 1. it'll take forever and 2. I know a LOT of people who have the same problem. And I want my fricken' ipod library to be perfect for once. I'm creating this post to open the floor for suggestions and I will update any code that successfully works because i feel like this is going to be a long road.
  11. oh whoops lmao yea that's right
  12. WinSetState($Window,"",@SW_HIDE) WinSetState($Window,"",@SW_SHOW)
  13. #include <Array.au3> dim $Var[1] $aFixed = DriveGetDrive('fixed') $aRemovable = DriveGetDrive('removable') For $x = 1 to $aFixed[0] $Var[0] +=1 _ArrayAdd( $Var,$x) Next For $i = 1 to $aRemovable[0] $Var[0] +=1 _ArrayAdd( $Var,$i) Next This is just a rough idea, but basically it gets all the info from both and combines it into 1 array, $Var. $Var[0] is the total number of items it catches. let me know if this helps:)
×
×
  • Create New...