Leaderboard
Popular Content
Showing content with the highest reputation on 02/04/2016 in all areas
-
There's no rational reason I can think of to use parentheses around a string in that way.2 points
-
I hope this will help with your understanding. #cs The search direction varies as follows: Left-to-Right - left < right Right-to-Left - right < left Top-to-Bottom - top < bottom Bottom-to-Top - bottom < top #ce ; PixelSearch(left, top, right, bottom, color ,s-v) ; Search directions based on the relative sizes of the function parameters (left, top, right, and bottom) $aCoord = PixelSearch( 900, 100, 1015, 515, 0xff0000 , 2 ) ; Left-to-Right & Top-to-Bottom because left < right & top < bottom $aCoord = PixelSearch( 900, 515, 1015, 100, 0xff0000 , 2 ) ; Left-to-Right & Bottom-to-Top because left < right & bottom < top $aCoord = PixelSearch(1015, 100, 900, 515, 0xff0000 , 2 ) ; Right-to-Left & Top-to-Bottom because right < left & top < bottom $aCoord = PixelSearch(1015, 515, 900, 100, 0xff0000 , 2 ) ; Right-to-Left & Bottom-to-Top because right < left & bottom < top ;....................(..^.,..^.,....^.,....^..,......^...,.^.) ; ;....................(left, top, right, bottom, color ,s-v)2 points
-
Hi, This is my first question and l am a new in AutoIT scripting. As any beginner I have started with reading some scripts and I found many developers use this form to assign a simple string to a variable: $var = ("string"). Maybe it is a simple question but I would like really to know why especially when I tried to display the value of $var with MsgBox I found it a simple String. Thanks in advance1 point
-
GUI butttons - highlight
dynamitemedia reacted to Melba23 for a topic
dynamitemedia, Look at GUICtrlCreateTab - the idea would be to have 10-15 images per tab. M231 point -
error471, Force all the elements into the Number datatype before sorting: #include <Array.au3> Local $avArray[5][2] = [ _ [15, 20], _ ['24', 32], _ [8, 16], _ [3, 35], _ ['10,5', 19]] _ArrayDisplay($avArray, "$avArray BEFORE _ArraySort()") For $i = 0 To UBound($avArray) - 1 $avArray[$i][0] = Number($avArray[$i][0]) Next _ArraySort($avArray, 1, 0, 0, 0) _ArrayDisplay($avArray, "$avArray AFTER _ArraySort() ascending column 0") By default _ArraySort sorts on character ASCII codes, hence the apparent errors. M231 point
-
I cant say I've seen that used, at least not enough that I've noticed it.1 point
-
@HermiM No reason, just outdated scripts , Don't use it, It will only evaluate "string" once more (which isn't required) P.S Its AutoIt, not AutoIT!1 point
-
Looks confusing to me1 point
-
pblikpb, I feared as much. You appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. M231 point
-
OmarPapi, As you have no done what I suggested: I am not surprised. This is what I meant: #include <MsgBoxConstants.au3> $sFile = "records.dat" ; Check if file exists If FileExists($sFile) Then ; If it does then ask if it should be deleted If MsgBox($MB_OKCANCEL, "Cancel file", "the file records.dat exists .. want to delete it!") = $IDOK Then ; And delete it if required FileRecycle($sFile) ;Return False EndIf EndIf Please ask if you have any questions. M231 point
-
Well, personally I use ' in my queries and " for my strings in autoit EX $sQuery="Select * from "&$tbl&" where field='"&$value&"'" Its also important to realize what data type SQL is using. For example, if the field is nvarchar you need to use ' but if the field is TEXT you need to use " in SQL. So there really isn't a standard on how to do this because it is really specific to the database your connecting to. I use a lot of Regex and StringReplace with my SQL. One that I use all the time is: if Stringinstr($val,"'") then StringReplace($val,"'","`") Additionally, don't use quotes to qualify your fields. Use [] EX: "SELECT call.[Call ID], call.[Ihre Referenz], call.Status, call.[Lief_ an Name] FROM DB.table call WHERE call.[Ihre Referenz] Not Like '%Payment%')" As for SQL injection, that really only is for URLs if I'm not mistaken so I'm not sure how it relates to autoit. Unless you are accepting CMD line args to pass to your autoit app, it shouldn't affect you. Its more for websites that have connections to DBs... EX: https://duckduckgo.com/?q=1 point
-
Of course you can, just more if conditions beneath the other.1 point
-
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 198, 66, 192, 124) $Radio1 = GUICtrlCreateRadio("Notepad", 8, 8, 113, 17) $Button1 = GUICtrlCreateButton("Open Notepad", 8, 32, 83, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $Button1 If GUICtrlRead($Radio1) == 1 Then Run("notepad.exe") EndIf EndSwitch WEnd1 point
-
OutlookEX UDF
George-Peterson reacted to water for a topic
Glad to be of service BTW: If you like what you get, you could press the "Like this" button to let me know1 point -
OutlookEX UDF
George-Peterson reacted to water for a topic
Use _OL_ItemFind to search for the item and return the EntryID, then pass this EntryID to _OL_ItemModify to change the appointment. See the example scripts for details.1 point -
Forum Rules
edenwheeler reacted to Jon for a topic
We want the forum to be a pleasant place for everyone to discuss AutoIt scripting, and we also want to protect the reputation of AutoIt. So we ask you to respect these simple rules while you are here: Forum Posting 1. Do not ask for help with AutoIt scripts, post links to, or start discussion topics on the following subjects: Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc. Bypassing of security measures - log-in and security dialogs, CAPTCHAs, anti-bot agents, software activation, etc. Automation of software/sites contrary to their EULA (see Reporting bullet below). Launching, automation or script interaction with games or game servers, regardless of the game. Running or injecting any code (in any form) intended to alter the original functionality of another process. Decompilation of AutoIt scripts or details of decompiler software. This list is non-exhaustive - the Moderating team reserve the right to close any thread that they feel is contrary to the ethos of the forum. 2. Do not post material that could be considered pornographic, violent or explicit - or express personal opinions that would not be acceptable in a civilized society. Do not post any copyrighted material unless the copyright is owned by you or by this site. 3. To protect this community, any files posted by you are subject to checks to ensure that they do not contain malware. This includes, but is not limited to, decompilation and reverse engineering. 4. Do not flame or insult other members - and just report the thread to a Moderator (see below) if you are so attacked. 5. Do not PM other users asking for support - that is why the forum exists, so post there instead. 6. Do not create multiple accounts - if you inadvertently created multiple accounts then contact a Moderator to close the unwanted ones. 7. Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above. 8. Do not delete your posts, nor completely remove their content, if doing so will interrupt the flow of the thread. 9. Do not post in a thread while the Moderating team are actively trying to determine whether it is legal. The Moderation team will do their best to act in fair and reasonable manner. Sanctions will only be applied as a last resort and any action taken will be explained in the relevant thread. If moderation action is taken, you will need to acknowledge this through a dialog or you will be unable to post further in the forum. Please note that this dialog is not an agreement that the warning was justified - it is only there so that members are aware that moderation action has been taken and that they may have certain restrictions applied to their account. If you feel that you have been unfairly moderated then contact the Moderator concerned - using a PM or the "Report" button is preferable to opening a new thread (although new members may have to do this). But do be aware that the Moderation team has the final word - the rules are set out by the site owner and you are only welcome here if you respect his wishes. Signatures and Avatars There is no formal policy for the use of signatures but if a moderator thinks it is too big and/or distracting then you may be asked to tone it down. No-one likes wading through signatures that are a page high. Similarly for avatars, expect distracting flashing and animated gifs to be removed. Reporting If you feel a post needs Moderator attention, please use the "Report" button next to the post date at the top. You can then enter details of why you have reported the post - but there is no need to include the content of the post as that is done automatically. The Moderating team will be alerted to the post and will deal with it as soon as they can. If you suspect a EULA violation, do not expect the Moderating team to do all the work - please provide some evidence in the report such as a copy of (or link to) the EULA in question, as well as the section you believe has been violated. Finally, please do not enter into an argument with the original poster - that is why we have Moderators. Spam Please do not react to spam in any way other than reporting it. Multiple reports are combined by the forum software, so there is no need to announce that you have reported the spam - in fact doing so only increases the work for the Moderator who deals with it. Interacting with this website Anyone found abusing the website is subject to harsh punishment without warning. A non-exhaustive list of potential abuses include: Automated forum registration or login. Automated posting or sending messages on the forum. Automated manipulation of polls, user reputation or other forum features. Automated creation or comments on issue tracker tickets. Automated creation or editing of wiki pages. Other abuses which are either examples of excessive bandwidth usage or automation of the site. Use common sense. If you do not have common sense, don't do anything. Do not automate the forum, wiki or issue tracker in any way at all. Scripts which automatically update AutoIt such as AutoUpdateIt are acceptable as long as they are not abused and do not generate excessive bandwidth usage.1 point