Leaderboard
Popular Content
Showing content with the highest reputation on 11/19/2013 in all areas
-
Google Maps UDF
mLipok reacted to seangriffin for a topic
This UDF allows users to create and manipulate Google Map and Google Earth controls within an AutoIT GUI. This UDF currently implements functions from: Google Maps Javascript API Version 3Google Earth API Version 1REQUIREMENTS: AutoIt3 3.2 or higherGoogle Earth plugin for Internet Explorer (for _GUICtrlGoogleEarth_* functions only)a Google Maps API key (for _GUICtrlGoogleEarth_* functions only)LIST OF FUNCTIONS: EXAMPLE: Google Maps Example The following example demonstrates how the Google Maps UDF can be used to create an embedded Google Map in an AutoIT GUI. It allows the user to: pan the view to a new locationzoom to different levelsadd markers to different locations on the map (using different icons)make all markers hidden, shown, deleted, or panned into viewhide and show the map itselfchange the map typeadd (render) a route between two locationsget the details of a route (navigation instructions, distances and durations)When the GUI first opens, the location "Palm Beach, Queensland, Australia" is displayed. A series of tabs exist at the bottom where similar controls are grouped together. The user may type a latitude and longitude, or an address, within the Set View To, Add Marker To input controls. For example, both "Sydney, New South Wales, Australia" and "-34.397, 150.644" would be valid. Whilst View All Markers after Add is checked, everytime Add Marker To is clicked the map's view will be adjusted to include all markers, including the one just added. Also note the following: the GUI itself is resizable and maximizable, and resizing it will also resize the mapwhilst the cursor is within in the input fields (Set View to, Zoom view to and Add Marker to) the Enter key will trigger the associated buttonThe Route Info button may need to be clicked more than once to return a result. Unknown at this stage what is wrong.Google Maps Example.au3 Google Earth Example The following example demonstrates how the Google Maps UDF can be used to create an embedded Google Earth in an AutoIT GUI. When the GUI first opens, the location "Palm Beach, Queensland, Australia" is displayed. The user may use their mouse and keyboard, in the same manner as in Google Earth, to pan and zoom around the Earth. The GUI itself is resizable and maximizable, and resizing it will also resize the Earth. Note that there are two prerequisites that you must complete prior to running this example successfully: The Google Earth Plug-in must be installed in your Internet Explorer browser. To install the plugin, using Internet Explorer visit http://code.google.com/apis/earth and follow the instructions provided.A Google Maps API key is also required for this example to work. You must obtain your own personal key from Google, and pass it into this example for it to work. To obtain a key, visit http://code.google.com/apis/maps/signup.html, and when prompted for your web site URL, supply the URL of "http://localhost". You will also be asked to sign in with your Google Account details.Google Earth Example.au3 DOWNLOAD: Latest Version - v0.4 (10/06/10) Google Maps.au31 point -
My comment was as well!1 point
-
Thanks Melba23 i didn't know about article(Adding PDFs to AutoIt and SciTE). fikri1979... Click on GuiExtender from Melba23 signatures and download it and past it in same folder......as your script.1 point
-
fikri1979, You can download the UDF from the link in my sig below. Do NOT put it in the AutoIt "Include" folder as suggested above. Either put it in the same folder as the script - or create your own "Include" folder as explained in the Adding UDFs to AutoIt and SciTE tutorial in the Wiki. M231 point
-
Download GUIExtender.au3 From >here. and past it in Include Folder normly Include is in autoit dirictory(C:Program FilesAutoIt3Include).1 point
-
fikri1979, If you had wanted to use my UDF then it works like this: #include <GUIConstantsEx.au3> #include "GUIExtender.au3" Example() Func Example() $Formoninotool = GUICreate("0nin0 ", 343, 600, 420, 100) _GUIExtender_Init($Formoninotool) $MenuItemtutor = GUICtrlCreateMenu("&TUTOR") $MenuItemtools = GUICtrlCreateMenu("T&OOLS") $MenuItemxl = GUICtrlCreateMenu("&XL") GUISetBkColor(0xC0DCC0) _GUIExtender_Section_Start($Formoninotool, 0, 215) $btnstart = GUICtrlCreateButton("START", 16, 24, 65, 25) $btnstop = GUICtrlCreateButton("STOP", 96, 24, 65, 25) $Inputportproxy = GUICtrlCreateInput("Port injek", 184, 24, 65, 21) $Checkboxproxy = GUICtrlCreateCheckbox("use proxy", 264, 24, 73, 17) $Status = GUICtrlCreateGroup("Status", 8, 112, 321, 49) $Copyright = GUICtrlCreateLabel("Copyright@0nin0 Faundation 2013", 32, 136, 168, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $GroupMode = GUICtrlCreateGroup("Mode", 8, 56, 321, 49) $Radio1ssh = GUICtrlCreateRadio("2 SSH", 16, 80, 57, 17) $Radio2ssh = GUICtrlCreateRadio("3 SSH", 80, 80, 57, 17) $Radio4ssg = GUICtrlCreateRadio("4 SSH", 144, 80, 57, 17) $Radio5ssh = GUICtrlCreateRadio("5 SSH", 208, 80, 57, 17) $Radio6ssh = GUICtrlCreateRadio("6 SSH", 272, 80, 49, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) _GUIExtender_Section_Action($Formoninotool, 2, "Hide Akun", "Data Akun", 8, 168, 97, 17) ; Normal button _GUIExtender_Section_End($Formoninotool) _GUIExtender_Section_Start($Formoninotool, 215, 385) $ExLaInput1 = GUICtrlCreateLabel("Host:", 32, 200, 30, 17) $ExLAInput2 = GUICtrlCreateLabel("Port: ", 32, 250, 30, 17) $ExLaInput3 = GUICtrlCreateLabel("User: ", 32, 300, 30, 17) $Inputproxy = GUICtrlCreateInput("Host",100, 198, 100, 17) $Inputport = GUICtrlCreateInput("Port", 100, 248, 100, 17) $InputUser = GUICtrlCreateInput("User", 100, 298, 100, 17) $ExInput4 = GUICtrlCreateLabel("Melba23", 32, 350, 168, 17) $ExInput5 = GUICtrlCreateLabel("Melba23", 32, 400, 168, 17) $ExInput6 = GUICtrlCreateLabel("Melba23", 32, 450, 168, 17) $ExInput7 = GUICtrlCreateLabel("Melba23", 32, 500, 168, 17) _GUIExtender_Section_End($Formoninotool) ; Retract lower section _GUIExtender_Section_Extend($Formoninotool, 2, False) GUISetState(@SW_SHOW) While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $GUI_EVENT_CLOSE Exit EndSwitch Switch $aMsg[1] Case $Formoninotool _GUIExtender_Action($aMsg[1], $aMsg[0]) ; Check for click on Action control EndSwitch WEnd EndFunc M231 point
-
Lets check anotherone For you.........According your givan images. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIResizeMode", $GUI_DOCKALL) EX() Func EX() Local $msg $Formoninotool = GUICreate("0nin0 ", 343, 215, 420, 100) $MenuItemtutor = GUICtrlCreateMenu("&TUTOR") $MenuItemtools = GUICtrlCreateMenu("T&OOLS") $MenuItemxl = GUICtrlCreateMenu("&XL") GUISetBkColor(0xC0DCC0) $btnstart = GUICtrlCreateButton("START", 16, 24, 65, 25) $btnstop = GUICtrlCreateButton("STOP", 96, 24, 65, 25) $Inputportproxy = GUICtrlCreateInput("Port injek", 184, 24, 65, 21) $Checkboxproxy = GUICtrlCreateCheckbox("use proxy", 264, 24, 73, 17) $Status = GUICtrlCreateGroup("Status", 8, 112, 321, 49) $Copyright = GUICtrlCreateLabel("Copyright@0nin0 Faundation 2013", 32, 136, 168, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Checkboxdataakun = GUICtrlCreateCheckbox("Data Akun", 8, 168, 97, 17) $GroupMode = GUICtrlCreateGroup("Mode", 8, 56, 321, 49) $Radio1ssh = GUICtrlCreateRadio("2 SSH", 16, 80, 57, 17) $Radio2ssh = GUICtrlCreateRadio("3 SSH", 80, 80, 57, 17) $Radio4ssg = GUICtrlCreateRadio("4 SSH", 144, 80, 57, 17) $Radio5ssh = GUICtrlCreateRadio("5 SSH", 208, 80, 57, 17) $Radio6ssh = GUICtrlCreateRadio("6 SSH", 272, 80, 49, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg=$Checkboxdataakun Then If GUICtrlRead($Checkboxdataakun)=1 Then winmove("","",Default,Default,Default,600) GUICtrlSetData($Checkboxdataakun,"Hide Akun") $ExLaInput1 = GUICtrlCreateLabel("Host:", 32, 200, 30, 17) $ExLAInput2 = GUICtrlCreateLabel("Port: ", 32, 250, 30, 17) $ExLaInput3 = GUICtrlCreateLabel("User: ", 32, 300, 30, 17) $Inputproxy = GUICtrlCreateInput("Host",100, 198, 100, 17) $Inputport = GUICtrlCreateInput("Port", 100, 248, 100, 17) $InputUser = GUICtrlCreateInput("User", 100, 298, 100, 17) $ExInput4 = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 350, 168, 17) $ExInput5 = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 400, 168, 17) $ExInput6 = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 450, 168, 17) $ExInput7 = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 500, 168, 17) Else winmove("","",Default,Default,Default,240) GUICtrlSetData($Checkboxdataakun,"Show Akun") EndIf Endif WEnd GUIDelete() EndFunc1 point
-
Check this one... #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIResizeMode", $GUI_DOCKALL) EX() Func EX() Local $msg $Formoninotool = GUICreate("0nin0 ", 343, 215, 420, 100) $MenuItemtutor = GUICtrlCreateMenu("&TUTOR") $MenuItemtools = GUICtrlCreateMenu("T&OOLS") $MenuItemxl = GUICtrlCreateMenu("&XL") GUISetBkColor(0xC0DCC0) $btnstart = GUICtrlCreateButton("START", 16, 24, 65, 25) $btnstop = GUICtrlCreateButton("STOP", 96, 24, 65, 25) $Inputportproxy = GUICtrlCreateInput("Port injek", 184, 24, 65, 21) $Checkboxproxy = GUICtrlCreateCheckbox("use proxy", 264, 24, 73, 17) $Status = GUICtrlCreateGroup("Status", 8, 112, 321, 49) $Copyright = GUICtrlCreateLabel("Copyright@0nin0 Faundation 2013", 32, 136, 168, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Checkboxdataakun = GUICtrlCreateCheckbox("Data Akun", 8, 168, 97, 17) $GroupMode = GUICtrlCreateGroup("Mode", 8, 56, 321, 49) $Radio1ssh = GUICtrlCreateRadio("2 SSH", 16, 80, 57, 17) $Radio2ssh = GUICtrlCreateRadio("3 SSH", 80, 80, 57, 17) $Radio4ssg = GUICtrlCreateRadio("4 SSH", 144, 80, 57, 17) $Radio5ssh = GUICtrlCreateRadio("5 SSH", 208, 80, 57, 17) $Radio6ssh = GUICtrlCreateRadio("6 SSH", 272, 80, 49, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg=$Checkboxdataakun Then If GUICtrlRead($Checkboxdataakun)=1 Then winmove("","",Default,Default,Default,600) GUICtrlSetData($Checkboxdataakun,"Hide Akun") $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 200, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 250, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 300, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 350, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 400, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 450, 168, 17) $ExInput = GUICtrlCreateLabel("AdnanBaloch[Starstar]", 32, 500, 168, 17) Else winmove("","",Default,Default,Default,240) GUICtrlSetData($Checkboxdataakun,"Show Akun") EndIf Endif WEnd GUIDelete() EndFunc1 point
-
Something to keep in mind: There's software you write for yourself, and there's software you write for others. When I write a utility or program for myself, I often times skip some of the various error traps and things that make a program bullet-proof - or at least bullet resistant. When the software is intended for others, I often have to add numerous lines of code to make sure it won't explode in a user's face. A "real" program, meant to be used in production by actual users is often times 80% safety code, and 20% algorithms (if you'll forgive me pulling a number out of my arse). So it's likely someone can make a really short program, but it probably won't be very forgiving. For example, what happens if the mouse starts at the top of the monitor? How is it going to move even further up?1 point
-
Have you learned to see this post is over 5 YEARS OLD?1 point
-
1.when I have more than 1 channel, the other channels (the ones that are not the _CommSwitch one) still receives in internal buffer or they loose the received bytes while they are not the selected one? Any channels opened remain open untill closed. While they are open they receive and send data even if they are not the selected channel. Selecting a channel only means you have specified which channel, or COM port, your script will be dealing with. If a channel is recieving data and the script doesn't attend to it then depending on the handshaking, or lack of it, data could be lost if the buffer becomes full. See post 366. 2. what´s the diference betwen _CommGetstring() and _CommReadByteArray? (please, see next question) Strings are in fact only ASCII strings in this UDF. A string is a sequence of ASCII characters terminated by 0x00. If you want to send and recieve data which might include 0x00 then you cannot use _CommGetString or _CommSendString. You must instead use _CommRead/Sendbyte or _CommRead/SendByteArray. In most cases ReadByte or SendByte will work ok and is the simplest method. However, if you need to deal with a lot of binary data and speed is important then the byte array functions are very much faster. You need to cretae a DllStruct to use the byte array functions $Numbytes1 = 16;say we have 16 bytes $Struct1 = DllStructCreate("byte[" & $Numbytes1 & "]") For $n = 1 To Numbytes1 ;put some random numbers in the struct DllStructSetData($Struct1, 1, Random(0, 255, 1), $n) Next ;send the bytes _CommSendByteArray(DllStructGetPtr($Struct1), $Numbytes1, 1) if @error then MsgBox(0, 'ERROR', '_CommSendByteArrray failed') 3. ".. memory starting at address $pAddress" in CommReadByteArray , means that it´s an array $x[...]? If yes, each received byte will be at $x[0], $x[1]...? But as Au3 defines the "type" of variable on the fly, what´s the type of variable you suggest, and how to declare them at Global, Local, etc? And if $pAddress is a string, each received byte will be a "char" at the string? I suppose the string must have a defined size before call _CommSendString? If so, what´s the diference for _CommGetstring()? See the previous answer and example. 4. maybe same question of 2 above, what´s the diference betwen _CommSendString and _CommSendByteArray Sendstring is for sending an ASCII string. Say $stringToSend = "LetMeOutOfHere!". Sendbyte.. is for sending 8 bit bytes with a value from 0, which cannot be included in a string, up to 255. 5. there is a way to not stop receiving if 0x00 arrives in the middle of a message? Not if you receive using GetString. You can keep using GetByte and add the bytes to an array if you don't know how many bytes are coming, or use _CommGetByteArray with wait set to 0 so that it will return with however many bytes are in the input buffer. 6. I suppose that we can send 0x00 with _CommSendString without any problem (supposing the receiver is a PIC or whatever and don´t worry about receiving 0x00, and I converted my "bytes" to "char" -> $x= chr(0) ). No. 0x00 marks the end of a string and is not sent so your PIC, Arduino or whatever will never get it. You have to use the byte functions 7. About 64 bits, means that dll works in a 64 bits systems (win7, XP), with au3 compiled as a 32 bits application and do not work with au3 compiled as a 64 bits application? The dll is 32 bit and will only work with 32 bit applications. They don't have to be AutoIt. It could be a PHP scripts, but it still has to be 32 bit. 8. on 03 Nov 2010 - 7:30 PM, you tell about possible protection issues into have the dll in the same folder than the compiled .exe in win7. There is anything we must do at the target win7 or xp PC about this "protection issue" or it does not exists, I mean, just copy the .exe and .dll to same folder and it will work ok? Even if the logged user is not administrator? I think that was just an example where a customer has the dll removed sometimes and I assume it's his virus protection but I don't know. He simply keeps a copy of the dll somewhere and copies it back when needed. I don't know why a dll in the script folder should be a problem. If I seach for dll's on your PC you will find many applications have them in their program folders.1 point