Jump to content

Leaderboard

Popular Content

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

  1. Some crazy dude came to ##AutoIt yesterday to troll, His IP was from UK, Here is the whole conversation: Apr 19 12:38:34 * Now talking in ##AutoIt Apr 19 12:38:34 * Topic is: 'Welcome! This is the unofficial IRC channel for AutoIt! Please be kind, the moderation team will try its best act in a fair manner :) || All discussion related to the administration of this channel are dicussed in ##AutoIt-Ops. || Offtopic chat: ##AutoIt-Offtopic || Please use Pastebin (http://pastebin.com/) for code longer than 3 lines. || Rules: http://bit.ly/AutoItChannelRules' Apr 19 12:38:34 * Set by TheDcoder!~TheDcoder@unaffiliated/thedcoder on Sat Apr 16 20:25:28 2016 Apr 19 12:38:35 * Channel ##AutoIt url: https://www.autoitscript.com Apr 19 12:38:55 * SyncYourDogmas (xxxxxxxxxxxxxxxxxxxx) Quit (Ping timeout: 246 seconds) Apr 19 13:02:09 * Charlie_ (5c2833e6@gateway/web/freenode/ip.xxxxxxxxxxxxxx) has joined ##AutoIt Apr 19 13:02:32 * Charlie_ is now known as Guest65544 Apr 19 13:03:34 <<Guest65544>> Hi, what is an AutoIt? Apr 19 13:03:55 <<TheDcoder>> Wow Apr 19 13:04:15 <<TheDcoder>> AutoIt is a programming language Apr 19 13:04:15 <<Guest65544>> world of warcraft? Apr 19 13:04:26 <<TheDcoder>> not world of warcraft Apr 19 13:04:38 <<Guest65544>> you say wow Apr 19 13:05:02 <<TheDcoder>> there are other meanings to wow -_- Apr 19 13:05:11 <<Guest65544>> my languge is english Apr 19 13:05:28 <<TheDcoder>> I am not talking Japanese Apr 19 13:06:11 <<Guest65544>> what is a programming language? Apr 19 13:06:25 <<TheDcoder>> look, if you want to troll, got to some other place Apr 19 13:06:57 <<Guest65544>> what is a troll? Apr 19 13:07:01 <<TheDcoder>> https://en.wikipedia.org/wiki/Programming_language Apr 19 13:07:25 <<TheDcoder>> https://en.wikipedia.org/wiki/Internet_troll Apr 19 13:07:51 <<Guest65544>> what is this channel for, to send links? Apr 19 13:08:01 <<TheDcoder>> Read them Apr 19 13:08:17 <<TheDcoder>> This channel is about AutoIt Apr 19 13:08:20 <<Guest65544>> why are you nasty? Apr 19 13:08:53 -> *ChanServ* op ##AutoIt TheDcoder Apr 19 13:08:53 * ChanServ sets mode: +o TheDcoder Apr 19 13:08:56 Usage: KICK <nick> [reason], kicks the nick from the current channel (needs chanop) Apr 19 13:09:01 * Guest65544 was kicked by TheDcoder (troll) Apr 19 13:09:12 -> *ChanServ* deop ##AutoIt TheDcoder Apr 19 13:09:13 * ChanServ sets mode: -o TheDcoder Apr 19 13:10:39 * guest456743 (5c2833e6@gateway/web/freenode/ip.xxxxxx) has joined ##AutoIt Apr 19 13:10:52 <<guest456743>> hi Apr 19 13:11:13 <<guest456743>> i lost connect Apr 19 13:12:43 <<TheDcoder>> Yeah, I kicked you Apr 19 13:12:45 <<TheDcoder>> lol Apr 19 13:13:00 <<guest456743>> why? Apr 19 13:13:07 <<TheDcoder>> Another attempt for trolling will not be tolerated/ Apr 19 13:13:11 <<TheDcoder>> *. Apr 19 13:13:23 <<guest456743>> are you the big boss? Apr 19 13:13:34 <<TheDcoder>> kind of Apr 19 13:14:00 <<guest456743>> how do you like the extreme power? Apr 19 13:14:26 <<TheDcoder>> I don't like or dislike it Apr 19 13:14:38 <<TheDcoder>> only used for moderation of the channel Apr 19 13:15:18 <<guest456743>> Can you please just tell me somethings about AutoIt? Apr 19 13:16:10 <<TheDcoder>> AutoIt is used for creating programs Apr 19 13:16:27 <<guest456743>> Like games? Apr 19 13:17:08 <<guest456743>> or like notepads? Apr 19 13:17:20 <<TheDcoder>> Both Apr 19 13:17:45 <<guest456743>> Can you help with a problem I am having? Apr 19 13:17:55 <<TheDcoder>> what is it? Apr 19 13:18:48 <<guest456743>> I bought a new wizard hat, and it got a bit crumpled while I was sitting in my closet Apr 19 13:19:05 <<TheDcoder>> please stop, last warning. Apr 19 13:19:32 <<guest456743>> <I put on my wizards hat> Apr 19 13:20:13 <<guest456743>> Don't make me pick up my wand Apr 19 13:20:42 <<TheDcoder>> Sure, I won't let you Apr 19 13:20:44 -> *ChanServ* op ##AutoIt TheDcoder Apr 19 13:20:44 * ChanServ sets mode: +o TheDcoder Apr 19 13:20:46 * TheDcoder sets quiet on guest456743!5c2833e6@gateway/web/freenode/ip.xxxxxxx Apr 19 13:20:48 -> *ChanServ* deop ##AutoIt TheDcoder Apr 19 13:20:49 * ChanServ sets mode: -o TheDcoder Apr 19 13:21:13 * guest456743 (5c2833e6@gateway/web/freenode/ip.xxxxx) Quit (Quit: Page closed) Apr 19 13:21:20 -> *ChanServ* op ##AutoIt TheDcoder Apr 19 13:21:20 * ChanServ sets mode: +o TheDcoder Apr 19 13:21:30 * TheDcoder removes quiet on guest456743!5c2833e6@gateway/web/freenode/ip.xxxxxx Apr 19 13:21:44 * wizard_ (5c2833e6@gateway/web/freenode/ip.xxxxx) has joined ##AutoIt Apr 19 13:21:51 <<wizard_>> Hi! Apr 19 13:22:05 * TheDcoder sets quiet on *!*@gateway/web/freenode/ip.xxxxxxx Apr 19 13:22:07 <<@TheDcoder>> Bye Apr 19 13:22:18 * wizard_ (5c2833e6@gateway/web/freenode/ip.xxxx) Quit (Client Quit) Apr 19 13:22:57 * wizard2 (5c2833e6@gateway/web/freenode/ip.xxxxx) has joined ##AutoIt Apr 19 13:23:11 <<@TheDcoder>> It won't work Mr. Wizard Apr 19 13:23:12 * wizard2 (5c2833e6@gateway/web/freenode/ip.xxxxx) Quit (Client Quit) Apr 19 13:23:14 <<@TheDcoder>> lol Apr 19 13:24:33 * Magic_Marvin (bc1d387a@gateway/web/freenode/ip.xxxxxx) has joined ##AutoIt Apr 19 13:24:45 <<Magic_Marvin>> Is anybody there? Apr 19 13:24:58 <<@TheDcoder>> Yes, I am here Apr 19 13:25:21 <<Magic_Marvin>> New channel I have not seen here before Apr 19 13:25:36 <<Magic_Marvin>> What ae you about Apr 19 13:25:41 <<Magic_Marvin>> are Apr 19 13:25:59 <<@TheDcoder>> We are defiantly not about trolling Apr 19 13:26:22 * TheDcoder sets mode: +i ##AutoIt Apr 19 13:26:25 * TheDcoder sets mode: -i ##AutoIt Apr 19 13:26:44 <<Magic_Marvin>> excuse me? Apr 19 13:26:54 <<@TheDcoder>> yes? Apr 19 13:27:14 <<Magic_Marvin>> What is this channel for Apr 19 13:27:26 <<@TheDcoder>> Read the channel topic Apr 19 13:27:44 <<@TheDcoder>> "Welcome! This is the unofficial IRC channel for AutoIt!" Apr 19 13:27:45 <<Magic_Marvin>> how Apr 19 13:28:09 <<@TheDcoder>> This is channel is about AutoIt Apr 19 13:28:11 <<Magic_Marvin>> ah, the scripting language Apr 19 13:28:14 <<@TheDcoder>> yes Apr 19 13:28:21 <<Magic_Marvin>> a Apr 19 13:28:29 <<Magic_Marvin>> I am familiar with it Apr 19 13:28:34 <<@TheDcoder>> nice' Apr 19 13:28:50 <<Magic_Marvin>> for hacking and viruses Apr 19 13:29:02 <<@TheDcoder>> No Mr. Troll Apr 19 13:29:13 <<Magic_Marvin>> pardon? Apr 19 13:29:22 * TheDcoder sets quiet on *!*@gateway/web/freenode/ip.* Apr 19 13:29:32 * TheDcoder removes quiet on *!*@gateway/web/freenode/ip.xxxxx Apr 19 13:29:34 * Magic_Marvin (bc1d387a@gateway/web/freenode/ip.xxxxx) Quit (Quit: Page closed) Apr 19 13:30:45 * StinktPete (bc1d3da8@gateway/web/freenode/ip.xxxxx) has joined ##AutoIt Apr 19 13:31:04 <<@TheDcoder>> It won't work, leave this channel now Apr 19 13:31:21 * StinktPete (bc1d3da8@gateway/web/freenode/ip.xxxxxxxx) Quit (Client Quit) Apr 19 13:31:32 <<@TheDcoder>> lel Apr 19 13:31:44 <<@TheDcoder>> Time for my lunch, BBIAW guys Apr 19 13:32:40 * guest___ (bc1fd3ef@gateway/web/freenode/ip.xxxxx) has joined ##AutoIt Apr 19 13:33:47 * guest___ (bc1fd3ef@gateway/web/freenode/ip.xxxxx) Quit (Client Quit) Apr 19 13:45:29 * AutoBert (5ec4db2c@gateway/web/freenode/ip.xxxxx) has joined ##AutoIt Apr 19 13:46:24 * TheDcoder removes quiet on *!*@gateway/web/freenode/ip.* Apr 19 13:46:32 <<AutoBert>> Cannot send to channel Apr 19 13:46:50 <<@TheDcoder>> Don't worry, I removed the quiet on freenode web clients :) Apr 19 13:47:00 -> *ChanServ* deop ##AutoIt TheDcoder Apr 19 13:47:01 * ChanServ sets mode: -o TheDcoder Apr 19 13:47:41 <<AutoBert>> I never used irc before so done search for browser Apr 19 13:48:03 <<TheDcoder>> I recommend using KiwiIRC :) Apr 19 13:48:18 <<TheDcoder>> KiwiIRC runs in the browser Apr 19 13:48:35 <<TheDcoder>> We had a spammer using freenode web client Apr 19 13:48:35 <<AutoBert>> Like a plugin? Apr 19 13:48:40 <<TheDcoder>> No, a web page Apr 19 13:49:04 <<TheDcoder>> So I muted clients from freenode web client :P Apr 19 13:49:04 <<AutoBert>> I though it was a install client Apr 19 13:49:38 <<TheDcoder>> You can use HexChat if you need a desktop client :) Apr 19 13:50:06 <<AutoBert>> thanks I read the tut Apr 19 13:50:11 <<TheDcoder>> :D Apr 19 13:50:14 <<AutoBert>> I have autoit problem Apr 19 13:50:25 <<TheDcoder>> Yes, what is it? Apr 19 13:51:13 <<AutoBert>> I was making a script while wearing my crumpled wizards hat, and it blew up my computer Apr 19 13:51:14 <<AutoBert>> lol Apr 19 13:51:26 <<AutoBert>> bye Apr 19 13:51:26 <<TheDcoder>> what the... Apr 19 13:51:28 <<TheDcoder>> lol Apr 19 13:51:29 <<TheDcoder>> bye The only strange thing is that... at the moment of our last conversation, he changed his nick to "AutoBert" (Scroll to the bottom of the log.)... I really wonder if it was @AutoBert?
    2 points
  2. trancexx

    GIF Animation

    No it doesn't speak, I lied. That is impossible. It's about setting animated GIF (and every other type of images) to a GUI control. How is this done for animated GIF? Few simple steps: - created ImageList of GIF Bitmaps retrieved from gif file/resource - created Pic control - every now and then another image is displayed. This is determined by frame delay time - see gif specification somewhere. That's it. All that takes time and could potentially block our gui/script. That's why flying assembly is used. Animation is done in another thread different from one AutoIt's code is executed in. Nothing stops animation but you. Animation works both for x64 and x86. Also it works for all kind of images not only GIFs. That means you can use it to display PNGs, BMPs, JPGs, etc... All of them from resources too. Example: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GIFAnimation.au3" Opt("MustDeclareVars", 1) ; Start by choosing GIF to display Global $sFile = FileOpenDialog("Choose Image", "", "(*.gif;*.png;*.jpg;*.tiff;*.bmp;*.jpeg)", -1, "") If @error Then Exit ; Make GUI Global $hGui = GUICreate("GIF Animation", 500, 500, -1, -1, $WS_OVERLAPPEDWINDOW) ; Add some buttons Global $hButton = GUICtrlCreateButton("&Pause animation", 50, 450, 100, 25) Global $hButton1 = GUICtrlCreateButton("&Delete Control", 200, 450, 100, 25) Global $hButton2 = GUICtrlCreateButton("&Open Image", 350, 450, 100, 25) ; Make GIF Control Global $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10) If @extended Then GUICtrlSetState($hButton, $GUI_DISABLE) GUICtrlSetTip($hGIF, "Image") ; Additional processing of some windows messages (for example) GUIRegisterMsg(133, "_Refresh") ; WM_NCPAINT GUIRegisterMsg(15, "_ValidateGIFs") ; WM_PAINT Global $iPlay = 1 ; Show it GUISetState() ; Loop till end While 1 Switch GUIGetMsg() Case -3 Exit Case $hButton If $iPlay Then If _GIF_PauseAnimation($hGIF) Then $iPlay = 0 GUICtrlSetData($hButton, "Resume animation") EndIf Else If _GIF_ResumeAnimation($hGIF) Then $iPlay = 1 GUICtrlSetData($hButton, "Pause animation") EndIf EndIf Case $hButton1 _GIF_DeleteGIF($hGIF) Case $hButton2 $sFile = FileOpenDialog("Choose gif", "", "(*.gif;*.png;*.jpg;*.tiff;*.bmp;*.jpeg)", -1, "", $hGui) If Not @error Then _GIF_DeleteGIF($hGIF); delete previous $hGIF = _GUICtrlCreateGIF($sFile, "", 10, 10) If @extended Then GUICtrlSetState($hButton, $GUI_DISABLE) Else GUICtrlSetState($hButton, $GUI_ENABLE) EndIf GUICtrlSetTip($hGIF, "Image") $iPlay = 1 GUICtrlSetData($hButton, "Pause animation") EndIf EndSwitch WEnd Func _Refresh($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_RefreshGIF($hGIF) EndFunc ;==>_Refresh Func _ValidateGIFs($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam _GIF_ValidateGIF($hGIF) EndFunc ;==>_ValidateGIFs It should be 0% cpu. Download from here if you want to impress chicks: http://code.google.com/p/gif-animation/downloads/list There are 8 examples in there. GIF files are downloaded automatically if some example script needs it. Mostly from photobucket.com. Some examples work without classic download. Required data is get with InetRead(). That's mighty cool. So, download, open ZIP, grab folder inside and place it where you want. Run examples and that's it. Word or two about main function, _GUICtrlCreateGIF(). It can handle all sorts of input. Will display Images that are passed as binary, resource identifiers, strings, file names, ... everything. If it's valid image all works. For example, all this is valid: ; Pass GIF File path/name _GUICtrlCreateGIF("Some.gif", "", 10, 10) ; Binary data _GUICtrlCreateGIF($bGIF, "", 10, 10,) ; PE Resource (file GIF.dll, Type: GIF, Name: 4) _GUICtrlCreateGIF("GIF.dll", "GIF;4", 10, 10, 100, 120) ; PE Resource (file @AutoItExe, Type: RES, Name: BLAH, Language: 1033) _GUICtrlCreateGIF(@AutoItExe, "RES;BLAH;1033", 10, 10) ; PE Resource (file "explorer.exe", Type: 2, Name: 6801) _GUICtrlCreateGIF("explorer.exe", "2;6801", 10, 10) ;<- BITMAP ; PE Resource (file @AutoItExe, Type: RC_DATA, Name: PNG) _GUICtrlCreateGIF(@AutoItExe, "10;PNG", 10, 10) ; GIF string _GUICtrlCreateGIF(FileRead("Some.gif"), "", 10, 10) ____________________________________________
    1 point
  3. 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
  4. Ideas are not that difficult ;-) but guessing what kind of application makes life difficult. 1. Do not minimize 2. Maximize and move it to second screen or 2nd desktop or virtual screendriver 3. Move window to corner so although window is there you can set values 4. Run it in a minimized virtual pc Making screenshots of minimized windows is impossible unless the AUT has functions for it to print on a devicecontext.
    1 point
  5. Hello! , How are we doing today? I am guessing we all are doing fine . Lets get to the point, the reason why I created this bot (base) is that ##AutoIt needs a bot too! ##c has a bot made in C, ##haskell has a bot made in haskell etc... It would not be good if we don't have a bot for ourselves! , Thus I created this bot base (I nick named it DcoderBot). I could create a Feature list here but I already made one in the GitHub page, so I won't do it now, If you want to see the features list, please refer to this link! Download GitHub https://github.com/TheDcoder/IRC-Bot-Base-for-AutoIt Thanks and enjoy!
    1 point
  6. 1 point
  7. Change the query line as below Local $Query = "INSERT INTO `Binary`(`Name`,`Data`) VALUES('" & $idVarInput_CAName & "'," & $value & ")" In your code... ? is surrounded by single quotes as '?'.So your query isn't able to be parsed. I removed only the single quote part...it is working..
    1 point
  8. mLipok

    Font Icon UDF

    Nice. Thanks for sharing. Btw. Added to the Wiki: https://www.autoitscript.com/wiki/User_Defined_Functions#Misc
    1 point
  9. jchd

    prime numbers!

    Don't cheat, work it out by yourself for 3 and 11! This is your easy assignment for today
    1 point
  10. RTFC

    prime numbers!

    A similar trick exists for divisibility by three: Any number is divisible by three if the sum of its individual digits is divisible by three. (So 21 = 2+1 = 3 is divisible by three (7), and 123 = 1+2+3=6 is also divisible by three (41)).
    1 point
  11. This is my first UDF! It calculate number of working days between two dates including holidays in Poland. WorkingDaysDifference.au3
    1 point
  12. qwert

    Get Network Adapter Info

    Thanks for this worthwhile utility script. I was able to get the result I expected on the first PC I tested (shown below). However, on a second PC that had its network adapter disabled by the control panel settings, the script got an "incorrect number of subscripts" error. I inserted an _ArrayDisplay() statement. The array shows only one row with 0 and 5 in the columns. Can your utility be made to show all adapters in the PC, even those that are disabled? Thanks for any help you can give.
    1 point
  13. youtuber, Your code is unreadable. Could you please explain with words what you want to do and what should be the expected result ?
    1 point
  14. I think using a ComboBox is better. Something similar to: #cs ----------------------------------------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: AutoBert: http://autoit.de/index.php?page=Thread&postID=164341#post164341 Skriptbeispiel für den Umgang mit INI-Files und ComboBox #ce ----------------------------------------------------------------------------------------------------------- #include <GUIConstantsEx.au3> #Include <GuiComboBox.au3> #include <StaticConstants.au3> Const $sElect = "bitte eine URL auswählen" Const $sAppIni=@AppDataDir&"\URL.INI" Global $URL If Not FileExists($sAppIni) Then $sData = "AutoIt=http://autoit.de" & @LF $sData &= "Buch=http://autoit.de/index.php?page=Thread&postID=92818#post92818" & @LF $sData &= "richtig Posten=http://autoit.de/index.php?page=Thread&threadID=4424" & @LF $sData &= "Tutorial=http://wiki.autoit.de/wiki/index.php/Tutorial" & @LF $sData &= "Skriptfehler finden=http://autoit.de/index.php?page=Thread&threadID=13785" & @LF $sData &= "Hilfe=http://translation.autoit.de/autoitinfo/hilfedateien/AutoIt-Hilfe-Deutsch-3.3.6.1-Stand-09_05_10.zip" & @LF $sData &= "MiniUrl-Manger=http://autoit.de/index.php?page=Thread&postID=164341#post164341" & @LF IniWriteSection($sAppIni, "URLs", $sData) EndIf $hGui = GUICreate("MiniUrl-Manager", 300, 90, 302, 218) $hcboProg = GUICtrlCreateCombo("", 8, 8, 200, 25) $hbtnAdd = GUICtrlCreateButton("&Hinzufügen", 213, 8,80) $hbtnDel = GUICtrlCreateButton("&Löschen", 213, 35,80) $hlblURL = GUICtrlCreateLabel("", 8, 70, 290,25) $hbtnOpen = GUICtrlCreateButton("&Öffnen", 8, 35,200) GUICtrlSetState($hbtnOpen, $GUI_DISABLE) GUICtrlCreateGraphic(0,65,300,2,$SS_ETCHEDHORZ ) read_INI() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $hbtnAdd $write1 = InputBox("URL", "Bitte eine gültige URL eingeben") If $write1 <> "" Then $write2 = InputBox("URL verwalten unter", "Bitte Kurzbegriff eingeben") If $write2 <> "" Then IniWrite($sAppIni, "URLs", $write2, $write1) GUICtrlSetData($hcboProg, $write2, $write2) EndIf show_Selection() Case $hbtnDel $sDel = GUICtrlRead($hcboProg) IniDelete($sAppIni, "URLs", $sDel) GUICtrlSetData($hcboProg,"") read_INI() Case $hcboProg show_Selection() Case $hbtnOpen ShellExecute($URL) ;ConsoleWrite($URL & @CRLF) EndSwitch WEnd Func read_INI() $list1 = IniReadSection($sAppIni, "URLs") ConsoleWrite($list1 & @CRLF) if IsArray($list1) Then For $i = 1 To $list1[0][0] GUICtrlSetData($hcboProg, $list1[$i][0]) Next EndIf _GUICtrlComboBox_InsertString ($hcboProg,$sElect,0) _GUICtrlComboBox_SetCurSel($hcboProg,0) EndFunc ;==>read_INI Func show_Selection() If GUICtrlRead($hcboProg) = $sElect Then GUICtrlSetState($hbtnOpen, $GUI_DISABLE) GUICtrlSetData($hlblURL, "") Else GUICtrlSetState($hbtnOpen, $GUI_ENABLE) $Prog = GUICtrlRead($hcboProg) ConsoleWrite("ausgewählt: " & $Prog & @CRLF) $URL = IniRead($sAppIni, "URLs", $Prog, "") GUICtrlSetData($hlblURL, $URL) EndIf EndFunc ;==>show_Selection would be the better solution.
    1 point
  15. Without more info's nothing, maybe with some more info's @junkew has an idea.
    1 point
  16. czardas

    Get Network Adapter Info

    That's quite a nicely written piece of code. Good job!
    1 point
  17. Melba23

    Encrypt

    mendrofa, Searching the forums will provide you with a lot more information in greater detail, but in brief: Your plain language script is within the compiled .exe, but in compressed form. It is not immediately viewable with a hex editor, but is by no means secure as it is expanded in memory when the .exe is run. So, compiling an AutoIt script will prevent quick snooping, but a determined, experienced hacker can relatively easily get your source - including passwords, specific filenames, etc - or the encryption routines you have used in your script to encrypt/decrypt them if they are stored in another file. And as part of the campaign to save the Oozlum bird, this thread will now be locked. As mentioned above, search the forum and you will find many other (locked) threads on this subject. M23
    1 point
  18. Hello all, New Release 1.6.1 (June 09) As IT guy, one of your task is to know if something goes wrong before you have people phoning to you. That's why I created ping test ! This script pings every x sec every IP address from a hosts file,(can ping in your network or outside of your network) , put in red the ones that are not working in green the ones that are good. I created as well the Icon (for the task bar see pictures!) grip.dll contains only icons (Gree-Red) It needs to be in your @SystemDir or in the same folder as pingtest.exe I take the hosts file from my linux server. (so for instance: \\mylinux\etc\hosts)(but can be anywhere else...) Sorry for making the pictures ugly, but security first ! In the script you NEED to change 2-3 lines before testing in your network: 1.) What you need to get rid of (or not) In my case (the lines with '#' are ignored ! depend of your hosts file) 2.) The begening of your IP address network (for instance: 10.10.) There is a timer set at 500 ms for the inside network and 5sec for the Internet !) 3.) The path for your server (for the command line !) (It is in the Settings since 1.5) I put an example of the hosts file enjoy... Host file exemple: # # # my hosts file # # www.google.com google # line of comment 123.456.789.111 IEsecond-hosts # inside network ! 10.10.10.1 my-main-server 10.10.10.2 my-second-server 10.10.10.10 my-printer EDIT 1 : update the ping test due to the change of AutoIt ! previous Number of download :+116 EDIT 2 : Update the Ping Test 1.5 Due to the change of AutoIt (V3.3.0.0) Previous Number of download +106 Ping Test 1.5 Removed: grip.DLL but: Added: icons into exe file using AutoIt3Wrapper Added: Settings Changed: Improved code Changed: Display (Thanks to Melba23) See the beginning of the code for more Info The Icons, au3 and even exe in the zip file! EDIT 3:Update the zip file little mistake in the au3 ! (download: +14) EDIT 4: Update to 1.6 (last download: +39) Added: ini file for the setting (read and write) : Idea from GreenCan Added: 2 pings for the Outside Network if we get an error: Idea from GreenCan EDIT 5: Update to 1.6.1: changed: Tray Improvement. Last download 1.6: +170 Pingtest1.6.1.zip
    1 point
  19. Get all includes used in a Au3 Script file. #include <Array.au3> #include <Constants.au3> #include <WinAPIEx.au3> ; By Yashied. Example() Func Example() ; Au3 Script. Local Const $sFilePath = @ScriptFullPath ; Create a string variable to hold includes found. Local $sIncludeString = '' Local $hTimer = TimerInit() If _GetIncludes($sFilePath, $sIncludeString) Then ConsoleWrite(TimerDiff($hTimer) & @CRLF) ; Split the string. Local Const $aIncludes = StringSplit($sIncludeString, '|') _ArrayDisplay($aIncludes) EndIf EndFunc ;==>Example Func _GetIncludes($sFilePath, ByRef $sIncludeString) Local Static $iRecursionCall = 0, _ $sIncludePath = _WinAPI_PathRemoveFileSpec(@AutoItExe) & '\Include', $sUserIncludePath = '' If Not $iRecursionCall Then If $sUserIncludePath = '' Then $sUserIncludePath = RegRead('HKEY_CURRENT_USER\SOFTWARE\AutoIt v3\AutoIt', 'Include') If $sUserIncludePath = '' Then $sUserIncludePath = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt', 'Include') EndIf If Not ($sUserIncludePath = '') Then If StringLeft($sUserIncludePath, 1) == ';' Then $sUserIncludePath = StringTrimLeft($sUserIncludePath, 1) EndIf If Not (StringRight($sUserIncludePath, 1) == ';') Then $sUserIncludePath &= ';' EndIf EndIf EndIf $sIncludeString &= $sFilePath & '|' EndIf Local Const $sFileFolder = _WinAPI_PathRemoveFileSpec($sFilePath) ; StringLeft($sFilePath, StringInStr($sFilePath, '\', Default, -1) - 1) Local $fFileExists = False, _ $iAutoItInclude = 1 Local Const $aFilePaths[2] = [$sFileFolder, $sIncludePath] Local $aArray = StringRegExp(FileRead($sFilePath), '(?im)^#include\h*([<"''][^*?"''<>|]+)', 3) For $i = 0 To UBound($aArray) - 1 Switch StringLeft($aArray[$i], 1) Case '<' ; AutoIt includes, Registry, Relative path. $iAutoItInclude = 1 Case '''', '"' ; Relative path, Registry, AutoIt includes. $iAutoItInclude = 0 EndSwitch $aArray[$i] = StringStripWS(StringTrimLeft($aArray[$i], 1), $STR_STRIPLEADING + $STR_STRIPTRAILING) $fFileExists = FileExists($aArray[$i]) If Not (StringMid($aArray[$i], 2, 2) == ':\') Or Not $fFileExists Then $fFileExists = FileExists($aFilePaths[$iAutoItInclude] & '\' & $aArray[$i]) If $fFileExists Then $aArray[$i] = $aFilePaths[$iAutoItInclude] & '\' & $aArray[$i] Else $aIncludesSplit = StringSplit($sUserIncludePath & $aFilePaths[Int(Not $iAutoItInclude)], ';') For $j = 1 To $aIncludesSplit[0] $aIncludesSplit[$j] = _WinAPI_PathRemoveBackslash($aIncludesSplit[$j]) $aArray[$i] = $aIncludesSplit[$j] & '\' & $aArray[$i] $aArray[$i] = _WinAPI_GetFullPathName($aArray[$i]) $fFileExists = FileExists($aArray[$i]) If $fFileExists Then ExitLoop EndIf Next EndIf EndIf If $fFileExists And Not StringInStr('|' & $sIncludeString, '|' & $aArray[$i] & '|') Then $sIncludeString &= $aArray[$i] & '|' $iRecursionCall += 1 _GetIncludes($aArray[$i], $sIncludeString) $iRecursionCall -= 1 EndIf Next If Not $iRecursionCall Then $sIncludeString = StringTrimLeft($sIncludeString, StringInStr($sIncludeString, '|', Default, 1)) ; Remove the main script file. $sIncludeString = StringTrimRight($sIncludeString, StringLen('|')) EndIf Return Not ($sIncludeString == '') EndFunc ;==>_GetIncludes
    1 point
  20. Note that this is the X and Y position of the element relative to the browser window, not relative to your computer's desktop. ; example usage #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oInputs = _IETagNameGetCollection ($oIE, "input") For $oInput In $oInputs $sMessage = "Form: " & $oInput.form.name & @LF $sMessage &= "Type: " & $oInput.type & @LF $sMessage &= "Value: " & $oInput.value & @LF $sMessage &= "ID: " & $oInput.id & @LF $sMessage &= "X: " & _IEfindPosX($oInput) & @LF $sMessage &= "Y: " & _IEfindPosY($oInput) & @LF $sMessage &= "Width: " & $oInput.offsetWidth & @LF $sMessage &= "Height: "& $oInput.offsetHeight & @LF $sMessage &= "--------------------" & @LF ConsoleWrite($sMessage) Next ; the UDFs func _IEfindPosX($o_object) local $curleft = 0 local $parent = $o_object if IsObj($parent) then while IsObj($parent) $curleft += $Parent.offsetLeft $parent = $Parent.offsetParent wend else local $objx = $o_object.x if IsObj($objx) then $curleft += $objx EndIf return $curleft EndFunc func _IEfindPosY($o_object) local $curtop = 0 local $parent = $o_object if IsObj($parent) then while IsObj($parent) $curtop += $Parent.offsetTop $parent = $Parent.offsetParent wend else local $objy = $o_object.y if IsObj($objy) then $curtop += $objy EndIf return $curtop EndFunc
    1 point
  21. Nope: Dim $szDrive, $szDir, $szFName, $szExt _PathSplit(@ScriptFullPath, $szDrive, $szDir, $szFName, $szExt) ConsoleWrite($szDrive & $szDir & @LF) Then here is a simple way for your functions: Func GetDir($sFilePath) If Not IsString($sFilePath) Then Return SetError(1, 0, -1) EndIf Local $FileDir = StringRegExpReplace($sFilePath, "\\[^\\]*$", "") Return $FileDir EndFunc Func GetFileName($sFilePath) If Not IsString($sFilePath) Then Return SetError(1, 0, -1) EndIf Local $FileName = StringRegExpReplace($sFilePath, "^.*\\", "") Return $FileName EndFunc
    1 point
  22. very neat. Here's a tool I made for the same purpose. edit: removed garbage from bad autoit tag production. edit: Added IP address in Listview and Host List support. Windows 7 icons are not correct. Will need to make an exception for Win7 vs Win XP. #include <GuiListView.au3> #include <Inet.au3> #include <File.au3> Global $delay $gui = GUICreate("PingTool", 480, 340, -1, -1, -1) $listview = GUICtrlCreateListView("|Hostname|IP|Sent|Recv|Lost|Last Seen ", 10, 10, 450, 280, 0x0008) ;Listview to Store Ping Info _GUICtrlListView_SetColumnWidth($listview,0,22) For $x = 3 to 5 _GUICtrlListView_SetColumnWidth($listview,$x,38) ;Set Sent, Recv, and Lost Columns Next _GUICtrlListView_SetColumnWidth($listview,6,119) $cmbDelay = GUICtrlCreateCombo("60",44,304,40,20,0x0003) ;Delay in Seconds GUICtrlSetData(-1,"45|30|15|5|1","5") GUICtrlCreateLabel("Every",10,308,30,30) GUICtrlCreateLabel("seconds",88,308,40,30) GUICtrlCreateLabel("Add:",160,308,26,30) $inputHost = GUICtrlCreateInput(@ComputerName,188,304,100,20) $btnAdd = GUICtrlCreateButton("",294,300,24,24, 0x0041) GUICtrlSetImage(-1, "C:\WINDOWS\system32\netshell.dll", -150, 0) GUICtrlCreateLabel("Open Host List:",354,308,80,30) $btnHostList = GUICtrlCreateButton("",434,300,24,24, 0x0040) GUICtrlSetImage(-1, "C:\WINDOWS\system32\shell32.dll", -43, 0) $contextmnu = GUICtrlCreateContextMenu($listview) $cntxtRem = GUICtrlCreateMenuItem("Remove Selected",$contextmnu) TCPStartup() ;Required for IP Resolution $delay = GUICtrlRead($cmbDelay) $timer = TimerInit() GUISetState(@SW_SHOW) While 1 ;Main Loop $nMsg = GUIGetMsg() Switch $nMsg Case -3 ;Exit TCPShutdown() Exit Case $cmbDelay ;Delay Time Change $delay = GUICtrlRead($cmbDelay) Case $btnAdd ;Add Host to Ping Listview _AddHost(StringUpper(GUICtrlRead($inputHost))) Case $cntxtRem ;Remove Host from Ping Listview _RemHost() Case $btnHostList _OpenList() ;Import Host List EndSwitch If TimerDiff($timer) > $delay * 1000 Then ;Perform Ping Routine if Delay Threshold is reached _PingRoutine() $timer = TimerInit() EndIf WEnd Func _PingRoutine() ;Loop through Listview $listcount = _GUICtrlListView_GetItemCount($listview) For $x = 0 To $listcount-1 _Ping($x) Next EndFunc Func _Ping($item) ;Individual Ping Routine $data = _GUICtrlListView_GetItemTextArray($listview,$item) $host = $data[2] $data[4] += 1 $id = _GUICtrlListView_GetItemParam($listview, $item) _Results($id,$data) GUICtrlSetImage($id, "C:\WINDOWS\system32\netshell.dll", -61) sleep(250) $ping = Ping($host,250) If $ping and Not @error Then $data[5] += 1 $data[7] = @HOUR & ":" & @MIN & ":" & @SEC & " " & @MON & "/" & @MDAY & "/" & @YEAR _Results($id,$data) GUICtrlSetImage($id, "C:\WINDOWS\system32\netshell.dll", -62) sleep(250) _HostOnline($id) Else $data[6] += 1 _Results($id,$data) _HostOffline($id,@error) EndIf EndFunc Func _HostOnline($item) ;Animate Host Online GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -63) sleep(125) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -60) sleep(125) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -63) sleep(125) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -60) sleep(125) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -63) EndFunc Func _HostOffline($item,$err) ;Animate Host Offline If $err = 3 Then GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -65) sleep(250) GUICtrlSetImage($item, "shell32.dll", -50) sleep(250) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -65) sleep(250) GUICtrlSetImage($item, "shell32.dll", -50) sleep(250) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -65) Else GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -66) sleep(250) GUICtrlSetImage($item, "shell32.dll", -50) sleep(250) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -66) sleep(250) GUICtrlSetImage($item, "shell32.dll", -50) sleep(250) GUICtrlSetImage($item, "C:\WINDOWS\system32\netshell.dll", -66) EndIf EndFunc Func _Results($item, $data) ;Set Listview Item Data Dim $str = "" For $x = 1 to UBound($data)-1 $str &= $data[$x] If $x < UBound($data) -1 Then $str &= "|" Next GUICtrlSetData($item,$str) EndFunc Func _AddHost($host) ;Add Host to Listview $ip = TCPNameToIP($host) If $ip <> $host Then GUICtrlCreateListViewItem("|" & $host & "|" & $ip & "|0|0|0",$listview) Else $host = _TCPIpToName($ip) GUICtrlCreateListViewItem("|" & $host & "|" & $ip & "|0|0|0",$listview) EndIf EndFunc Func _RemHost() ;Remove Host from Listview $item = _GUICtrlListView_GetSelectedIndices($listview,True) For $x = $item[0] To 1 Step -1 GUICtrlDelete(_GUICtrlListView_GetItemParam($listview, $item[$x])) Next EndFunc Func _OpenList() ;Import Host List $src = FileOpenDialog("Host List",@ScriptDir,"Text files (*.txt)|All (*.*)",1) If Not FileExists($src) Then Return 0 Local $arrHosts _FileReadToArray($src, $arrHosts) For $x = 1 to $arrHosts[0] _AddHost($arrHosts[$x]) Next EndFunc
    1 point
×
×
  • Create New...