Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/21/2016 in all areas

  1. quaizywabbit

    ANYGUI.au3

    For those of you who like to manipulate other program windows: 05 MAR, 2007 ANYGUIv2.8 ANYGUIv2.8.au3 modified _GuiTarget( ) to accept array in ControlId parameter to specify x/y CLIENTcoords of point in control (for those pesky .Net controls where controlid/classnameNN change frequently) for example: Dim $coords[2] $coords[0] = 200 ;point x to check in CLIENT COORDS $coords[1] = 29;point y to check in CLIENT COORDS WinActivate("Edit Database Item") $Ctrltarget = _GuiTarget("Edit Database Item", "", "", $coords)
    1 point
  2. J2TeaM

    Font Icon UDF

    This is an UDF that helps you use Font Awesome in your AutoIt project. Screenshot Download Click here to download! Usage/Example #NoTrayIcon #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> ; Font Icon UDF by Juno_okyo #include <font-icon.au3> Opt('GUIOnEventMode', 1) #Region ### START Koda GUI section ### Global $FormMain = GUICreate('Font Icon for AutoIt by Juno_okyo', 355, 126, -1, -1) GUISetFont(20, 400, 0, 'Arial') GUISetOnEvent($GUI_EVENT_CLOSE, 'FormMainClose') GUIStartGroup() Global $Label1 = GUICtrlCreateLabel('Juno_okyo', 25, 42, 155, 36) GUICtrlSetFont(-1, 24, 400, 0, 'Arial') ; See demo.html for Icon name Global $Label2 = GUICtrlCreateLabel(Font_Icon('icon-heart'), 193, 46, 35, 36) GUICtrlSetFont(-1, 20, 400, 0, 'juno_okyo') ; Font name GUICtrlSetColor(-1, 0xa83f39) ; Heart color ;) Global $Label3 = GUICtrlCreateLabel('AutoIt', 235, 42, 90, 36) GUICtrlSetFont(-1, 24, 400, 0, 'Arial') GUIStartGroup() GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func FormMainClose() Exit EndFunc Credits Author: Juno_okyo Font Awesome by Dave Gandy Source code on GitHub. Contributing are welcome!
    1 point
  3. I have created a UDF that will allow you to easily create a customizable GUI with either a standard progress bar or a marquee style progress bar. You can change the size and back ground color of the GUI, as well as the font, font size, and color of the text. The function doesn't require any parameters to operate, but the default text is very generic so you probably would want to set that at the very least. The function returns the handle/control id of the created GUI in the return value and the @extended macro holds the value of the control id of the progress bar so that you can update it. See update notes below for changes to the most recent version There is no functionality to close the GUI, so once you're done using it you need to GUIDelete the GUI using the return value. The default size is relatively small, only 290 x 100, which is sufficient for it's usage. The other default values are 14 for the font size, Arial for the font, the GUI background is Blue, and the label text is yellow. I created this function when I discovered that I needed a way to display something on the screen while my program was performing a lengthy operation that didn't require any screen output. I was using it to read ID3 tag information for about 4000 songs and it took some time to do that. Having a small gui with a configurable label and parameters allowed me to hide the program while informing the user that something was still going on. The only include needed to use this is the Send.au3 file that comes with AutoIt, so that the marquee style progress bar would work. I have changed the function for the marquee style progress bar to use GUICtrlSendMsg instead of _SendMessage so now it's completely stand-alone with no need for any external includes. UPDATED: 03/30/2012 I've gotten rid of most of the "magic numbers" in the script so that it's using constants for everything, and you'll have a better idea of what the code is doing. I've added the ability to set the background and label colors using the Default keyword, and -1. If you wish this GUI to use the color scheme of your Windows theme, or your skin theme, use "" as this will not set a color for the label text or the GUI background. I've limited the Y dimension of the GUI to no less than 100 pixels tall, as this would cause several issues with displaying things properly. I've updated the UDF header information so that things are a bit clearer as to how to use this. None of these changes should be script breaking, just added functionality and usage. UPDATED: 5/6/2011 Removed the need for any external includes, doesn't change the functionality in any way though so it will work as it did previously UPDATED: 5/6/2011 Updated the return values, it now returns an array on success. The array contains the handles to the GUI(array[0]), Progress Bar (array[1]), and the label (array[2]). So now you will be able to update the controls on the fly now. This version is incompatible with the previous versions because of the change. I have updated the example code below to match the newest version. Here is a short demo program showing how the 2 different progress bars would show up, and showing some of the custom features of the function. #include "_ProgressGUI.au3" $Return = _ProgressGUI("This is a test message xxxxxxxxxxxxxxx xxxxxxxxxxxxx", 1, 30, "", 400, 300);, 4, 6) For $I = 1 To 100 GUICtrlSetData($Return[1], $I) Sleep(100) If Mod($I, 2) Then GUISetBkColor(Random(0, 32767, 1), $Return[0]) Next Sleep(2000) GUIDelete($Return[0]) $Return = _ProgressGUI() Sleep(4000) And here's a link to the actual UDF Please let me know if you find it useful or have suggestions. Thanks for reading.
    1 point
  4. guinness

    get variable name

    Why would you want to do that? There seems no logical reason in my book.
    1 point
  5. Thanks "grandpa." . I am already working on new features on my DcoderBot (IRC Bot for handling those things).
    1 point
  6. I remember that in the IRC channels I'd go to, there would be a command that would send a chat window with a help / FAQ for ppl to get simple questions as this Guest was asking. Therefore avoiding the aggravating nonsense you found yourself in. Announcement of the command was at the header that is shown at join of a channel. I had scripts that run on my mIRC that took care of all that, but it's been well over 15 years ago. I have no clue of any of it anymore. It was done with a "robot user", just to attend to the commands. And was with channel defence scripts for attacks... , long time ago. I'm typing a story, just as grandpa would tell a story from his days of youth. I hope this helps.
    1 point
  7. When posting code on the forum please use the "<>" buttons in the editor to format them properly.
    1 point
  8. have a second exe watch the first program. if the second one sees the first one closed - it relaunches it. You could also use a service to run it.
    1 point
  9. Gianni

    Wanted: IP Calculator

    Something like what you are searching is performed by the _LanParameters() function included in my MultiPing.au3 posted here: If you call the function with blank parameters, it shows values related to the local network, or you can pass an IP, a mask in 4 octet format or as a CIDR number notation as well. For example: #include 'MultiPing.au3' ; <-- get here: https://www.autoitscript.com/forum/topic/156395-versatile-multi-ping/ _LanParameters('', '', 1) ; shows local lan parameters _LanParameters('192.168.0.1', 24, 1) ; shows parameters about given address
    1 point
  10. I think this has your answer: Cheers
    1 point
  11. Local $iPing = Ping("192.168.22.1", "250") Switch (@Error) Case 1 MsgBox("", "", "Host is offline.") ; I hope it's not, then you have no internet! Case 2 MsgBox("", "", "Host is unreacable.") Case 3 MsgBox("", "", "Bad destination.") Case 4 MsgBox("", "", "Other errors.") Case Else MsgBox($MB_SYSTEMMODAL, "", "The roundtrip-time took: " & $iPing & "ms.") EndSwitch
    1 point
  12. "The first thing to learn about regex is when not to use it" ?
    1 point
  13. Welcome to the forum. Please show us what you have coded so far.
    1 point
  14. mLipok

    Font Icon UDF

    Thanks. Fixed.
    1 point
  15. Thomymaster, Thanks for that - I will look to release a new version soon. M23
    1 point
  16. czardas

    prime numbers!

    Here's a version I wrote. I guess I can improve the code. It was an interesting challenge (the biggest step interval I ever used in a loop = 30030!). https://www.autoitscript.com/forum/topic/158400-resurrecting-a-2000-year-old-thread/?do=findComment&comment=1149851 If you look around the forum you will find more examples: https://www.autoitscript.com/forum/topic/164936-number-is-a-prime-number-challenge/
    1 point
  17. I made a quick Autoit review (again) and I do not think this is possible to do with AutoIt exactly all the things, what @Xandy said EDIT: Oooops sorry forget about one:
    1 point
  18. AZJIO

    Text Progress Bar

    Text Progress Bar Using symbols as a progress bar example #NoTrayIcon Opt("GUIResizeMode", 802) Opt("GUIDataSeparatorChar", ChrW('0x00A4')) Global $Color=0x00ccff, $BkColor=0xf7f7f7 ; En $Lng1='Used symbol :' $LngSt='Start' $LngSz='Size :' $LngDl='Delay :' $LngSty='Style :' $LngSel='Choose' $LngAdd='Add' ; Ru If @OSLang = 0419 Then $Lng1='Используемый символ :' $LngSt='Старт' $LngSz='Размер бара (кол. симв.) :' $LngDl='Задержка :' $LngSty='Стиль :' $LngSel='Выбрать' $LngAdd='Добавить' EndIf $hForm = GUICreate("Text Progress Bar", 380, 160+30, -1, -1, 0x00040000) $hButton1 = GUICtrlCreateButton($LngSt, 260,115, 80, 30) GUICtrlCreateLabel($Lng1, 10, 43, 130, 17) $symbol = GUICtrlCreateCombo('', 140,40, 60) GUICtrlSetData(-1,' '&ChrW('0x2588')&'¤|¤/¤\¤*¤(¤)¤'&ChrW('0x25CF')&'¤'&ChrW('0x25AA')&'¤'&ChrW('0x2022')&'¤'&ChrW('0x2039')&'¤'&ChrW('0x203A')&'¤'&ChrW('0x2206')&'¤'&ChrW('0x20AC')&'¤!¤.', ' '&ChrW('0x2588')) GUICtrlCreateLabel($LngSz, 10, 73, 130, 17) $kol_sim = GUICtrlCreateCombo('', 140,70, 60) GUICtrlSetData(-1,'20¤30¤50¤100¤120¤200', '20') GUICtrlCreateLabel($LngDl, 10, 103, 130, 17) $Delay = GUICtrlCreateCombo('', 140,100, 60) GUICtrlSetData(-1,'10¤20¤50¤100¤200', '20') GUICtrlCreateLabel($LngSty, 10, 133, 130, 17) $Style= GUICtrlCreateCombo('', 140,130, 60) GUICtrlSetData(-1,'1¤2¤3¤4¤5', '1') GUICtrlCreateGroup('', 205, 28, 160, 72) $hSelect = GUICtrlCreateButton($LngSel, 210, 40, 60, 25) $hAdd = GUICtrlCreateButton($LngAdd, 210, 70, 60, 25) $Un = GUICtrlCreateCombo('', 280,40, 60) GUICtrlSetData(-1,'2588¤25A0¤F031¤25B2¤25BA¤25BC¤2590¤2666¤25D8¤263B', '2588') GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $hButton1 $symbol0 = GUICtrlRead($symbol) $Delay0 = GUICtrlRead($Delay) $kol_sim0 = GUICtrlRead($kol_sim) $aStartTPB=_TPB_ProgressOn(10, 5, $kol_sim0, 21, $symbol0) For $i = 0 To 100 Sleep($Delay0) _TPB_ProgressSet($aStartTPB, $i) ; GUICtrlSetData($hButton1, $i & " %") Next ; GUICtrlDelete($aStartTPB[0]) ; _TPB_ProgressClose($aStartTPB) Case $hSelect Run('charmap.exe') Case $hAdd, $Un $Un0 = ChrW('0x'&GUICtrlRead($Un)) GUICtrlSetData($symbol, $Un0, $Un0) Case $Style Switch GUICtrlRead($Style) Case 1 $Color=0x00CCFF $BkColor=0xF7F7F7 Case 2 $Color=0xFF8700 $BkColor=0xFFFF8D Case 3 $Color=0xFF0361 $BkColor=0xFFDEDA Case 4 $Color=0x00A272 $BkColor=0xE8EED8 Case 5 $Color=0x515151 $BkColor=0xF1F1F1 Case Else $Color=0x00CCFF $BkColor=0xF7F7F7 EndSwitch EndSwitch WEnd Func _TPB_ProgressOn($left, $top, $amount, $height, $symbol) If IsDeclared('aStartTPB') And IsArray($aStartTPB) Then GUICtrlDelete($aStartTPB[0]) ; Delete Local $aStartTPB[3], $String=' ' For $i = 1 to $amount $String&=$symbol Next GUISetFont (12, 700) $aStartTPB[0] = GUICtrlCreateLabel($String, $left, $top, -1, $height) GUICtrlSetData(-1, '') GUICtrlSetColor(-1, $Color) GUICtrlSetBkColor(-1, $BkColor) ; GUICtrlSetColor(-1, 0xff8700) ; GUICtrlSetBkColor(-1, 0xffff8d) $aStartTPB[1] = $amount $aStartTPB[2] = $symbol Return $aStartTPB EndFunc Func _TPB_ProgressSet($aStartTPB, $Prosent = 0) If $Prosent < 0 Or $Prosent > 100 Then Return SetError(1, 0, 0) Local $kol=Int($Prosent*($aStartTPB[1]/100)), $String=' ' For $i = 1 to $kol $String&=$aStartTPB[2] Next If GUICtrlRead($aStartTPB[0])=$String Then Return GUICtrlSetData($aStartTPB[0], $String) EndFunc ; Func _TPB_ProgressClose($aStartTPB) ; GUICtrlDelete($aStartTPB[0]) ; EndFunc
    1 point
  19. I always see questions around the Forum about how to create a ProgressBar that shows at least something is happening, despite having no way of counting (see Traditional Example.) This is where _ProgressSetMarquee() is brilliant, because it creates the Marquee style (see Image) without all the fuss of knowing about _SendMessage() etc.. Try the Example below. Example: See post #7 for a short but simple example. or continue for those interested in API calling ... WARNING: The code below is old, outdated and poorly scripted, therefore caution should be used when viewing this code!
    1 point
  20. I just got it to work! I was having much trouble, reading all the threads and posts related to ImageSearch, and I'd like to help others now. Now got it to work as a x64 and also as a x32 script using both DLLs accordingly (on a Windows 8.1 x64 PC) One of the steps I took in debugging was putting this into (the top of) my script: $sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system. ConsoleWrite("$sOSArch=" & $sOSArch & @CR) $sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt. ConsoleWrite("$sAutoItX64=" & $sAutoItX64 & @CR)In any case you want to be consistent about 32bit or 64bit usage, and use the right DLL etc. What also really helped was putting in lots of debugging and error handling to zoom in on whatever specific part isn't working and why. Credits to Centrally (very helpful usage explanation and re-uploading the files) and kangkeng for making this possible in AutoIt, as well Miguel7 from the AutoHotKey forum who also posted some helpful advice. I've attached a zipped folder containing all of the needed Dlls and my customised Library, which also contains an example and some debugging: ImageSearch2015.zip Take a look inside ImageSearch2015.au3 here if you like: Edit: also uploaded "ImageSearch15.au3", a version of "my" ImageSearch Library without the built-in Example and Debugging (will require the Dlls in the .zip file though): ImageSearch15.au3 I hope this helps somebody! Let me know any feedback/issues.
    1 point
  21. An article about cryptowall - http://soft2secure.com/knowledgebase/cryptowall
    1 point
×
×
  • Create New...