
cybie
Members-
Posts
18 -
Joined
-
Last visited
Everything posted by cybie
-
Am I the only one who is getting a 404 on all the files including your screen shots? Where can I get xDrop now?
-
This is not a script or scrap so it doesn't really belong in this forum, but it sounds to me like you want to build a port scanner to sweep and see who may have FTP, fileshare or trojan ports open to exploit them... If that's not the case you have my apologies, but that's what it sounds like. Regardless, you'll want to post this to the help and support forum where people are often looking for a project. I hope you find whatever it is that you're looking for.
-
OK, I took _ispressed function into consideration, but I think the button method is possibly better. There will bo no click transferred to the application under the cursor because there is a window with a button in the way. Basically, this is the same thing as the last version, but when you click on the color box a new window is created at the size of the screen and at 1% opacity, then the cursor changes to a crosshair with the magnifier on the bottom right. Once you click on the color you like the large screen is hidden (not really visible to begin with) and you are ready to move on with the form or click another color picker box. Problems: 1. Because the window is in the way at 1% opacity, the colors may be slightly different than the actual colors on the screen. (UPDATE) 2. Burrup suggested that the color change within the color box as you move. I agree that this would be cool, but id not build it in yet. (FIXED) 3. The color-box does not initially read the contents of the inputbox next to it. I think this could probably be done easily, but you wouldn't always necessarily have a text box beside this... Updated Code: #cs AutoIt Version: 3.1.1 (beta) Language: English Platform: WinXP Author: Cybie Script Function: Color-picker function for use as a GUI Control #ce #include <GuiConstants.au3> HotKeySet("{ESC}", "Terminate") Opt ("GUICoordMode", 0) Opt ("WinTitleMatchMode", 4) $Color = 0x000000;First color displayed in all boxes GuiCreate ("Color Picker Demo", 250, 75) ; ---------------------------------------------------------------------------- ;INPUT FIELDS ; ---------------------------------------------------------------------------- GUICtrlCreateLabel ("Background Color:", 5, 7, 100, 20, 0x0002) $Background = GUICtrlCreateInput ("#FFFFFF", 105, -2, 100, 20) $ColorBox1 = GuiCtrlCreateLabel ("", 105, 0, 20, 20) GuiCtrlSetBkColor ($ColorBox1, $Color) GUICtrlCreateLabel ("Text Color:", -210, 25, 100, 20, 0x0002) $TxtColor = GUICtrlCreateInput ("#000000", 105, -2, 100, 20) $ColorBox2 = GuiCtrlCreateLabel ("", 105, 0, 20, 20) GuiCtrlSetBkColor ($ColorBox2, $Color) GUICtrlCreateLabel ("Link Color:", -210, 25, 100, 20, 0x0002) $Links = GUICtrlCreateInput ("#0000FF", 105, -2, 100, 20) $ColorBox3 = GuiCtrlCreateLabel ("", 105, 0, 20, 20) GuiCtrlSetBkColor ($ColorBox3, $Color) GuiSetState (@SW_SHOW) ; ---------------------------------------------------------------------------- ;RUN LOOP ; ---------------------------------------------------------------------------- $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg () Select Case $msg = $ColorBox1 $CurrentColorBox = $ColorBox1 $CurrentColorInput = $Background ColorPicker() Case $msg = $ColorBox2 $CurrentColorBox = $ColorBox2 $CurrentColorInput = $TxtColor ColorPicker() Case $msg = $ColorBox3 $CurrentColorBox = $ColorBox3 $CurrentColorInput = $Links ColorPicker() EndSelect Wend ; ---------------------------------------------------------------------------- ; FUNCTIONS ; ---------------------------------------------------------------------------- Func ColorPicker() GuiCreate ("Color Picker Mask", @DesktopWidth, @DesktopHeight, -1, -1, 0x80000000) WinSetTrans ("Color Picker Mask", "", 1);big trans window... $Capture = GuiCtrlCreateButton ("", 0, 0, @DesktopWidth, @DesktopHeight) GuiSetState (@SW_SHOW) GUISetCursor (3, 1) Local $SRCCOPY = 0x00CC0020 Local $MousePos ToolTip("AU3MAG", 0, 0) $MyhWnd = WinGetHandle("classname=tooltips_class32") $CrntColor = $Color $msg2 = 0 While $Color = $CrntColor $msg2 = GUIGetMsg () $MousePos = MouseGetPos() $PixColor = PixelGetColor($MousePos[0], $MousePos[1]) $TempColor = "0x" & Hex($PixColor, 6) GuiCtrlSetBkColor ($CurrentColorBox, $TempColor) GUICtrlSetData ($CurrentColorInput, StringReplace($TempColor, "0x", "#")) Select Case $msg2 = $Capture $MousePos = MouseGetPos() $PixColor = PixelGetColor($MousePos[0], $MousePos[1]) $Color = "0x" & Hex($PixColor, 6) ToolTip("", 0, 0) GuiCtrlSetBkColor ($CurrentColorBox, $Color) GUICtrlSetData ($CurrentColorInput, StringReplace($Color, "0x", "#")) GuiSetState (@SW_HIDE) EndSelect Sleep(25) $MyHDC = DLLCall ("user32.dll", "int", "GetDC", "hwnd", $MyhWnd) If @error Then Return $DeskHDC = DLLCall ("user32.dll", "int", "GetDC", "hwnd", 0) If Not @error Then $xy = MouseGetPos() If Not @error Then $l = $xy[0] - 10 $t = $xy[1] - 10 DLLCall ("gdi32.dll", "int", "StretchBlt", "int", $MyHDC[0], "int", _ 0, "int", 0, "int", 100, "int", 100, "int", $DeskHDC[0], "int", _ $l, "int", $t, "int", 20, "int", 20, "long", $SRCCOPY) WinMove($MyhWnd, "", $xy[0] + 20, $xy[1] + 20, 100, 100) EndIf DLLCall ("user32.dll", "int", "ReleaseDC", "int", $DeskHDC[0], "hwnd", 0) EndIf DLLCall ("user32.dll", "int", "ReleaseDC", "int", $MyHDC[0], "hwnd", $MyhWnd) Wend EndFunc ;==>ColorPicker Func Terminate() Exit 0 EndFunc ;==>Terminate I welcome improvements!!! EDIT: I removed the colorcaprture function as that is now integrated. My bad...
-
Dually noted. What I wanted to happen was to change the cursor to a crosshair, but as far as i could tell, that could only be accomplished by making a big transparent GUI window and changing the cursor within that. The transparancy doesn't work in all Windows versions right? Other than that, I wanted to make it capture the color on mouse click, but I couldn't find any way to detect the mouse click... Does anyone think that it would be acceptable to make a big, fully transparent GUI window with the crosshair cursor and a giant button so that anywhere they click , it clicks the button to initiate the color capture, then returns killing the big transparent GUI?
-
I was making a custom web page generator that would basically just stringreplace to customize a web page for individual web-affiliates on the fly. During this process, I thought it would be easiest to match the color on their current website by using a color-picker that most people are used to using. This is in no way comparable to xDrop(josbe) http://www.autoitscript.com/forum/index.ph...c=7027&hl=xdrop I must also thank Larry for the Magnify DLLCall, without which this would not have been as cool. Updated Below... I'm sure there are some improvements that can be made, but it's a functional start. I used this to populate the fields, then when the submit button is pressed all of the inputs are read using guictrlread and used as the strings that will replace the pre-marked strings in my HTML file.
-
I use AutoIt a lot when I am at work, but I like to lock my computer using the (WinKey + L) when I am away from my desk. I needed a way to let my AutoIt apps and scripts run while I am away form my deak for maximum use of the automation, without appearing like the computer is "doing something magical" or looking like it is open to people stopping by to read my email... Enter the Phony Windows Lock-Out. This is just a VERY basic GUI script that will make it look like the computer has been locked, while it's not really locked at all, therefore allowing your apps to run and not be stopped by windows. This was put together quickly, so there may be issues, but I know it's something that I need so maybe you do too. :"> ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.1 (beta) ; Language: English ; Platform: WinXP ; Author: Cybie ; ; Script Function: ; Fake the "computer locked" dialog so that AutoIt may run in the background. ; ; ---------------------------------------------------------------------------- #include <GuiConstants.au3> HotKeySet("{F2}","KillSwitch") $LockImage = @TempDir & "/" & "locked.jpg" FileInstall("locked.jpg", $LockImage, 1) $SecurityImage = @TempDir & "/" & "security.jpg" FileInstall("security.gif", $SecurityImage, 1) $username = "MKTNG\yourname (Your Name)" ; GUI looks like background. GuiCreate("x", @DesktopWidth, @DesktopHeight, -1, -1, 0x80000000) GUISetBkColor (0x6E8ADE) GuiSetState() GUICreate("Computer Locked", 400, 200, -1, -1, 0x00000000) GUISetBkColor (0xE0E0C0) GUICtrlCreatePic ($LockImage, 0, 0, 400, 75) GUICtrlCreatePic ($SecurityImage, 10, 85, 32, 25) GUICtrlCreateLabel("This computer is in use and has been locked.",52,85,325,20) GUICtrlCreateLabel("Only " & $username & " or an administrator can unlock this computer.",52,105,325,40) GUICtrlCreateLabel("Press Ctrl-Alt-Del to unlock this computer.",52,145,325,20) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() ;Keeps the computer from actually locking due to inactivity. $RandomMoveX = Random (1, @DesktopWidth) MouseMove ($RandomMoveX, @DesktopHeight) $RandomTime = Random (5000, 10000) Sleep($RandomTime) WinActivate("x") WinActivate("Computer Locked") Wend ;FUNCTIONS ;--------- Func KillSwitch() Exit 0 EndFunc NOTE: You will need to put the graphics attached to this post in the same directory as the script so that it may find them.
-
Thanks Alterego! I would also like to thank Larry for acting as the "Mr Clean"-inspired image would suggest and cleaning the code up. You're like the wise code janitor picking up after all of us. We appreciate it!
-
No problem, I just commented that stuff out and tried the rest as it was. Thanks for the reply SteveR. I played with this a little bit, but most of what I work with are web pages and it's not really in my best interest to have code interjected in my scrape results, such as line breaks and text formatting. It would be really cool to have a script remove all of the code from a document before/after scraping. Maybe something that finds the first < then the next > and counts the spaces in between then trims the middle out to remove all of the obvious/standard bits of HTML. I will try to play with this a little, but if someone beats me to it I won't be upset. Excellent work so far! I am glad someone else is working on this!
-
Hmm... Maybe I'm missing the obvious here, or I'm jumping ahead because I'm excited that this could be a big time-saver for me, so I'm overlooking the details, but I am missing the _ArrayDisplay function... Am I doing something stupid here, or is there something else that should be included?
-
Your page doesn't seem to work... Is there another place to get the easyarray.au3?
-
Here is a simple rule that Ihave picked up while cruising this forum for the past few months: If you have a script, post the script. I could come in here and ask for someone to give me a hand with building an antivirus scanner, just asking for some initial code, and say that I had completed most of the project before starting. Forum members help members that help themselves. Sorry, I don't need anyone claiming that I am "flaming" them, but I'm just saying show us what you've got.
-
Can you supply an example of how this could be used? I can't seem to figure out how I would make different tones and play them...
-
This is a cool weather tool, but is nothing like WeatherBug. WeatherBug is just a trojan, more-or-less, that happens to deliver weather news to you while it is loading your system full of it's affiliated spyware and sending your usage data back to arious vendors. Although this program also gives you weather info, it's actually just pulling an image from weather.com (or wherever you tell it to) and serving it up to you in a GUI. Techincally, you could use the exact same code to make something that shows you your websites usage statistics or virtualyl any other dynamically generated graphic on the web or on your own local network. While we are on the topic could someone tell me how to make the minimize and close buttons on the GUI work like they should??? This is something I have never dealt with and I can't seem to figure it out... Here is the code I have so far: (I need help getting close to work, as well as figuring out why the images don't switch as they should... Seems to be a problem with the loop...) #include <GUIConstants.au3> Opt("GuiOnEventMode", 1) HotKeySet ("^{F4}", "Close") HotKeySet ("{F5}", "GetDoppler") ;redesign to refresh whichever image is in window. HotKeySet ("{F1}", "Doppler") HotKeySet ("{F2}", "Current") HotKeySet ("{F3}", "Precip") $xPos = -1;center $yPos = 0 ;absolute top $Title = "Weather Station - [Ctrl+F4 to exit]" GUICreate ($Title, 720, 500, $xPos, $yPos) WinSetTrans ($Title, "", 200 );will not work on older Win OSes ; add section to allow the minimize, maximize and close to work. GUISetState () $GetMap = 1 ;set the default map as the doppler While 1 ;while open - continue looping If $GetMap = 1 Then GetDoppler () ElseIf $GetMap = 2 Then GetCurrent () ElseIf $GetMap = 3 Then GetPrecip () EndIf Sleep (5000) WEnd Func GetDoppler () InetGet ("http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg", @TempDir & "\weather.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather.jpg", -1, -1, 720, 485) EndFunc Func GetCurrent () InetGet ("http://image.weather.com/images/maps/current/cur_mw_720x486.jpg", @TempDir & "\weather2.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather2.jpg", -1, -1, 720, 485) EndFunc Func GetPrecip () InetGet ("http://image.weather.com/images/maps/current/ec_curtemp_720x486.jpg", @TempDir & "\weather3.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather3.jpg", -1, -1, 720, 485) EndFunc Func Doppler () $GetMap = 1 EndFunc Func Current () $GetMap = 2 EndFunc Func Precip () $GetMap = 3 EndFunc Func Close () Exit EndFunc
-
This program is fairly simple, but it's a hit! I have given this basic version in compiled form to a few people and they thought it was pretty cool. What I would like to do now is make GUI buttons across the top to load a different map into the window, but keep it refreshing every minute. I am working on making this work now, but if anyone else has any ideas, please bring them to the table. -again, thanks for bringing this idea out, Layer. This is fun to play with.
-
I just have to comment that this is one very nice program. The code looks pretty clean and you clearly know what you're doing. I will really enjoy and be able to use this program! Thanks!
-
Okay, although I have used AutoIt to make little scripts to catch popups and other minimal things, this is my first elaborate attempt at somthing that makes my job easier. The reason I made this script was because I frequently send a custom email to new individuals who sign up with us. I send the email to detail how to link to us, and include custom-coded HTML pages that they can implement on their own site. The emails and the HTML files included must contain a special code in the links back to our site for identification purposes, which is why the pages must be customized. This AU3 is set up to require 3 template pages that will require a replacement in their content prior to sending, one page that will remain static and a splash screen image that will display when you start the script (not important). You will need to adjust this to meet your needs, and I hope someone finds it useful to email new members or whoever you like. This is INCREDIBLY dependant on your computer having the same version of MS office installed that I have. There is a way to work around this and make it find the program, but I couldn't get it to work. Also, sometimes the program de-rails when it gets into MS Word... I'm not sure why... Here's the code: ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.0 ; Language: English ; Platform: WinXP ; Author: Cybie ; ; Script Function: ; Copy template HTML files, replace selected content and send the files via email using MS Word. ; ; ---------------------------------------------------------------------------- AutoItSetOption ( "RunErrorsFatal", 0 );set run failure to return 1 ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") ; ---------------------------------------------------------------------------- ; Install files into exe. ; ---------------------------------------------------------------------------- $splash = @TempDir & "splash.jpg" FileInstall("splash.jpg", $splash, 1) $content = @TempDir & "\content.html" FileInstall("content.html", $content, 1) $banners = @TempDir & "\banners.html" FileInstall("banners.html", $banners, 1) $email = @TempDir & "\affiliate-linking-email.html" FileInstall("affiliate-linking-email.html", $email, 1) $images = @TempDir & "\images.html" FileInstall("images.html", $images, 1) ; ---------------------------------------------------------------------------- ; Prompt for Producer Number ; ---------------------------------------------------------------------------- SplashImageOn("Splash Screen", $splash, 400, 200, -1, -1, 1) Sleep(1000) SplashOff() $input = InputBox("Affiliate Email Generator", "Enter replacement info:", "?????", "", -1, -1) ;Creates an input box for new data to replace the ????? - the ????? is the information in your files that will be replaced. If @error = 1 Then Exit EndIf ; ---------------------------------------------------------------------------- ; Create directory, copy files to it, switch to that directory ; ---------------------------------------------------------------------------- $scriptdir = @ScriptDir;variable for current directory DirCreate ( $scriptdir & "\" & $input ) $InstallDir = $scriptdir & "\" & $input FileCopy( $content, $InstallDir) FileCopy( $banners, $InstallDir) FileCopy( $email, $InstallDir) FileCopy( $images, $InstallDir) FileChangeDir( $InstallDir ) ; ---------------------------------------------------------------------------- ; Find and replace ????? with the proper producer number ; ---------------------------------------------------------------------------- $szFile = "content.html" $szText = FileRead($szFile,FileGetSize($szFile)) $szText = StringReplace($szText, "?????", $input) FileRecycle($szFile) FileWrite($szFile,$szText) $szFile2 = "banners.html" $szText2 = FileRead($szFile2,FileGetSize($szFile2)) $szText2 = StringReplace($szText2, "?????", $input) FileRecycle($szFile2) FileWrite($szFile2,$szText2) $szFile3 = "affiliate-linking-email.html" $szText3 = FileRead($szFile3,FileGetSize($szFile3)) $szText3 = StringReplace($szText3, "?????", $input) FileRecycle($szFile3) FileWrite($szFile3,$szText3) $szFile4 = "images.html" ; ---------------------------------------------------------------------------- ; Open in word & begin progress bar ; ---------------------------------------------------------------------------- $msword = MsgBox ( 36, "Affiliate Page Generator", "Proceed to MS Word Email?" , 10 ) If $msword = -1 Then Exit ElseIf $msword = 7 Then Run("explorer " & $InstallDir) Exit Else EndIf ProgressOn("Affiliate Email Generator", "", "0 percent", -1, -1, 16) ProgressSet(0 , "Percentage Complete", "Please Wait...") Run ("C:\Program Files\Microsoft Office\Office10\winword.exe") If @error = 1 Then MsgBox (0, "Affiliate Page Generator", "MS Word could not be found on your system." @CR "Displaying directory contents instead." ) Run("explorer " & $InstallDir) ;proper directory Exit EndIf WinWaitActive("Document") ;========VERY problematic part of the script. - Word sucks. Send("{ALTDOWN}o{ALTUP}") WinWaitActive("Open") ClipPut ( @WorkingDir & "\" & $szFile3) Send( "{CTRLDOWN}v{CTRLUP}" & "{ENTER}" ) WinWaitActive($szFile3) ProgressSet(25 , "Percentage Complete", "Please Wait...") ; ---------------------------------------------------------------------------- ; Open email dialog & attach files ; ---------------------------------------------------------------------------- Send("{ALTDOWN}fdm{ALTUP}") Send("{ALTDOWN}il{ALTUP}") WinWaitActive("Insert File") ClipPut ( @WorkingDir & "\" & $szFile) Send( "{CTRLDOWN}v{CTRLUP}" & "{ENTER}" ) ProgressSet(50 , "Percentage Complete", "Please Wait...") Send("{ALTDOWN}il{ALTUP}") WinWaitActive("Insert File") ClipPut ( @WorkingDir & "\" & $szFile2) Send( "{CTRLDOWN}v{CTRLUP}" & "{ENTER}" ) ProgressSet(75 , "Percentage Complete", "Please Wait...") Send("{ALTDOWN}il{ALTUP}") WinWaitActive("Insert File") ClipPut ( @WorkingDir & "\" & $szFile4) Send( "{CTRLDOWN}v{CTRLUP}" & "{ENTER}" ) ProgressSet(100 , "100% Complete", "Finished") ProgressOff() WinWaitClose ( $szFile3 ) ; ---------------------------------------------------------------------------- ; Open Excel for notes and Exit. ; ---------------------------------------------------------------------------- If WinExists ("Affiliate-Link-Emails") Then WinActivate ( "Affiliate-Link-Emails" ) ElseIf @Error = 0 Then ;============= $msexcel = MsgBox ( 36, "Affiliate Page Generator", "Note Excel Sheet for Producer " & $input & " ?", 10 ) If $msexcel = -1 Then Exit ElseIf $msexcel = 7 Then Exit Else EndIf ;============= Run ("C:\Program Files\Microsoft Office\Office10\excel.exe C:\Affiliate-Link-Emails.xls") If @error = 1 Then MsgBox (0, "Affiliate Page Generator", "Excel could not be found on your system" @CR "displaying directory instead." & $input) Run("explorer " & $InstallDir) Exit EndIf Else EndIf ; ---------------------------------------------------------------------------- ; Functions ; ---------------------------------------------------------------------------- Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc I believe I got the string replacement code from Larry's response to "Need help replacing text, Replace text in external file".
-
Excellent use of AutoIt to perform a basic time-saving task! I made some VERY MINOR alterations to your code and thought I would make my changes available. I removed the msgbox that came up with instructions to close, changed the shortcut to close to something that I am more familiar with that would not be used for anything else, made the window semi-transparent and organized the code a little diffently. The reason that I assigned variables to the title was to slim the size and make changes slightly easier and the reason I assigned variables to the height and width is in case you want to do any handy tricks like: $xPos = (@DesktopWidth - 700) $yPos = (@DesktopHeight - 500) to start the display ont he bottom or right side of your screen. Again, full credit for this goes back to Layer for this idea. #include <GUIConstants.au3> HotKeySet ("^{F4}", "Close") $xPos = -1 $yPos = 0 $Title = "Doppler Radar - [Ctrl+F4 to exit]" GUICreate ($Title, 700, 500, $xPos, $yPos, 0x00800000) WinSetTrans ($Title, "", 200 ) GUISetState () While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@TempDir & "\doppler.jpg", -1, -1, 700, 485) Sleep (60000) WEnd Func GetEcho () InetGet ("http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg", @TempDir & "\doppler.jpg", 1, 0) EndFunc Func Close () Exit EndFunc
-
Getting back to the topic at hand, how do you use the WinGetText to retrieve passwords? I personally find this very interesting because I am a user of the lazy "remember my password" setting and once in a while, if you can imagine, Windows will need to be killed and reloaded or something will fail and I will lose my saved passwords. I think this would be a GREAT way to get those passwords back.