Jump to content

big_daddy

Moderators
  • Posts

    2,566
  • Joined

  • Last visited

Reputation Activity

  1. Like
    big_daddy got a reaction from SOLVE-SMART in Include UDFs versus paste in snippets (VSCode-AutoItSnippets)   
    I appreciate the improvements. I’ll have some time to mess around with it tomorrow. 
  2. Thanks
    big_daddy reacted to SOLVE-SMART in Include UDFs versus paste in snippets (VSCode-AutoItSnippets)   
    Hi folks,

    I released Version v2.1.0, see CHANGELOG.

    @big_daddy
    I changed to proper escape pattern ✔ I switched to !_ instead of !au3_, because almost all user defined functions starting with a underscore ⚠ Function names are adjusted to starting with capital letter (after the underscore) to fit more common practise ✔ I still try to provide a user friendly way of snippet generation (the snippet management extensions that you mentioned, aren't that good) ⚠ Next release coming soon 😁 .

    Best regards
    Sven

    ________________
    Stay innovative!
  3. Like
    big_daddy reacted to SOLVE-SMART in Include UDFs versus paste in snippets (VSCode-AutoItSnippets)   
    Hi @big_daddy,

    sorry for my late response 😅 and thank you for investing the time to have a research 👍 .
    Yes this is unfortunately a problem, but shouldn't be a big one.
     
    They were updated in 2018 which could bring a lot of package dependencies problems when it come to relive them up 🙁 . I will do a research on my own.
     
    I will definitely change to the proper escape pattern 👍 .
     
    It's already the case. When you type !a and the IntelliSense of VSCode will show you all the extensions which do have the prefix !au3.
    But I see your point. This could be a breaking change in a way - but also not - I don't know right now, but lets see what I will do 😁 .

    Thanks for your input big_daddy cool 😅 .

    Best regards
    Sven

    ________________
    Stay innovative!
  4. Thanks
    big_daddy reacted to water in Excel - Filtered content to Array   
    _Excel_RangeRead always returns a "a zero-based array for a range of cells."
    AutoIt now allows to create arrays with 0 elements. Depends on the version you are running.
    This works for AutoIt 3.3.14.5:
    #include <Array.au3> Global $aTest[0][2] _ArrayDisplay($aTest)  
  5. Thanks
    big_daddy got a reaction from mLipok in ADO.au3 UDF - BETA - Support Topic   
    I was tasked with creating a utility that would parse an Excel document and then update an existing MySQL table. I'm much more comfortable using object oriented programming and I didn't want to creating a bunch of update queries. After quite a lot of trial, error, and research, I finally found a working solution. Thanks to @jchd for the post above that pointed me in the right direction. Also, thank you to @mLipok for a great UDF. 
    Note: This is snipped code and for concept purposes only.
    #include "ADO.au3" Global $sDriver = "" Global $sServer = "" Global $sDatabase = "" Global $sPort = "" Global $sUser = "" Global $sPassword = "" Global $sQuery = "SELECT * FROM table" Global $sNewValue = "Some Value" Global $sConnectionString = _ADO_ConnectionString_MySQL($sUser, $sPassword, $sDatabase, $sDriver, $sServer, $sPort) Global $oConnection = _ADO_Connection_Create() _ADO_Connection_OpenConString($oConnection, $sConnectionString) ; https://docs.microsoft.com/en-us/office/vba/access/concepts/miscellaneous/execute-method-ado-connection#remarks Global $oRecordset = _ADO_Recordset_Create() With $oRecordset .CursorLocation = $ADO_adUseClient .Properties("Update Criteria").Value = $ADO_adCriteriaKey .Open($sQuery, $oConnection, $ADO_adOpenDynamic, $ADO_adLockPessimistic) .MoveFirst() EndWith While Not $oRecordset.EOF() ; The update will fail if you attempt to update with equal values If StringCompare($oRecordset.Fields("Column").Value, $sNewValue) <> 0 Then _ $oRecordset.Fields("Column").Value = $sNewValue $oRecordset.MoveNext() WEnd $oRecordset.UpdateBatch()  
  6. Thanks
    big_daddy got a reaction from SOLVE-SMART in Include UDFs versus paste in snippets (VSCode-AutoItSnippets)   
    I like the premise of this extension and I believe it could be quite useful. I'd like to see a method to more easily add user snippets from within VSCode, similar to how https://snippet-generator.app/ works. If you could accomplish this, I believe that it would be high adopted.
    I'm not a fan of having to type !au3, however, I found that the included snippets can be accessed using a keyboard shortcut for "editor.action.showSnippets". Maybe you could add user friendly way to set this shortcut.
    Keep up the solid work!
  7. Like
    big_daddy got a reaction from yutijang in How To Start/stop/disable A Service   
    From the command prompt:
    sc config <servicename> start= disabled
    So for example to disable the Print Spooler service the command would be:

    sc config spooler start= disabled
    Edit: typo
  8. Like
    big_daddy got a reaction from mLipok in [Solved] How to Get the Focused Element in a WebPage?   
    You can use the activeElement property.


    #include <IE.au3> Global $sActiveElement = "", $sActiveElementOld = "" _IEErrorHandlerRegister() $oIE_form = _IE_Example("form") While __IEIsObjType($oIE_form, "browserdom") $sActiveElement = $oIE_form.document.activeElement.tagName If $sActiveElement <> $sActiveElementOld Then $sActiveElementOld = $sActiveElement ConsoleWrite("Tag Name of focused element: " & $sActiveElement & @CR) EndIf Sleep(100) WEnd
  9. Like
    big_daddy got a reaction from mexykanu in _IEFormElementOptionSelect doesn't trigger the onchange function in IE9+   
    I think this guy ran into the same issue. Luckily for us he also found a solution. Try something like this:
    $oEvt = $oIE.document.createEvent("HTMLEvents") $oEvt.initEvent("change", True, False) $oSelect.dispatchEvent($oEvt)
  10. Like
    big_daddy reacted to 13lack13lade in Opening PartlyKnown file name   
    thank you for that!
  11. Like
    big_daddy got a reaction from 13lack13lade in Opening PartlyKnown file name   
    Take a look at FileFindFirstFile() in the AutoIt Help File.
  12. Like
    big_daddy got a reaction from 0xdefea7 in Extract OnClick links on TR (without name)   
    #include <IE.au3> $sURL = "" $sTableId = "rounded-corner" _IEErrorHandlerRegister() $oIE = _IECreate($sURL) ; get reference to the table by id $oTable = _IEGetObjById($oIE, $sTableId) ; get a collection of all table rows $oTableRows = _IETagNameGetCollection($oTable, "TR") ; enumerate through the collection For $oTableRow In $oTableRows ; get the value of the onclick attribute $sOnClickValue = $oTableRow.getAttribute("onclick") ConsoleWrite($sOnClickValue & @CRLF) Next
  13. Like
    big_daddy got a reaction from tommytx in Is it possible to use autoit to set a select when they have no id or name.   
    Unless there are many select objects on the webpage I'd get reference to it by index. If this is not an option then you can use this function:
    Func _IEGetObjByClass(ByRef $o_object, $s_Class, $s_TagName = "*", $i_index = 0) ; Local $i_found = 0 ; $o_tags = _IETagNameGetCollection($o_object, $s_TagName) For $o_tag In $o_tags If IsString($o_tag.className) And $o_tag.className = $s_Class Then If $i_found = $i_index Then Return $o_tag $i_found += 1 EndIf Next ; Return SetError(1) EndFunc ;==>_IEGetObjByClass
  14. Like
    big_daddy got a reaction from coryc1123 in List Box not accepting change   
    I'm going to guess you are running into the same issue that we resolved >here.
  15. Like
    big_daddy got a reaction from Mbee in How to use RegRead with unknown valuenames?   
    You can use RegEnumVal to loop through the value names under the specified key.
  16. Like
    big_daddy got a reaction from jdelaney in Get input type   
    Don't forget to convert property returns that should be strings to a string using String() or check that it is a string with IsString(). Otherwise you can end up with an inadvertent match.
  17. Like
    big_daddy reacted to crashnburn in Javascript Submit Error   
    big_daddy you have been a blessing! Thank you very much for taking time to explain. I feel like I have a much more firm understanding of @exteneded now. Thank you again for all your help!
  18. Like
    big_daddy got a reaction from IgImAx in AutoIt Menu   
    I decided to try my luck at making a Firefox Extension from scratch, so what better for my first extension than something for AutoIt! This extension adds main-menu and context menu navigation for the AutoIt Forums.

    Screenshot:


    Now available on AMO!
    AutoIt Menu v1.3.1 (06/24/2011)

    If you are updating from a previous version you will need to install from the AMO site this one time. Future updates will happen as expected.

    ---

    Version History


    Added - Compatibility for Firefox through version 6.* Open Tickets

    Known Bugs:

    ---

    Comments and suggestions welcome!
  19. Like
    big_daddy got a reaction from JScript in _GetDefBrowser.au3 (UDF) - Get the name of the default browser.   
    It appears that the spoiler tags break the interface. For now, do not use them.
×
×
  • Create New...