autocart Posted September 12, 2015 Author Share Posted September 12, 2015 Why should I explain when it's obvious? It's like asking me to explain why hammer shouldn't be used as a saw. Or do you want me to explain that one too?LOL, unfortunately you are surrounded by a lot of stupid people who cannot see the obvious. I still can't. If you know a way of how to explain it better then yes, please. Link to comment Share on other sites More sharing options...
JohnOne Posted September 12, 2015 Share Posted September 12, 2015 (edited) FYI: Since this topic is about finding the address of an autoit variable, I've began a thread on the dllstruct usage elsewhere. Edited September 12, 2015 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
guinness Posted September 12, 2015 Share Posted September 12, 2015 LOL, unfortunately you are surrounded by a lot of stupid people who cannot see the obvious. I still can't. If you know a way of how to explain it better then yes, please.The functions are not designed to be used in that way, so to put it simply they are not managed by AutoIt. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
Danyfirex Posted September 12, 2015 Share Posted September 12, 2015 It does in some indirect way. By the way notice my reply to trancexx? I listened and took note as at the time she was the developer of AutoIt, so knows more about the core than you and I combined, unless you know about the internal workings of AutoIt?Enough to know that use the heap to variables and structures.Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2015 Share Posted September 12, 2015 I can't imagine situation in AutoIt where pointer to a variable would be needed unless you need to go outside the AutoIt. In that case it's almost mandatory to use dllstruct (COM interface excluded).autocart, can you make an example or maybe explain better?For all other cases (when you need to reference a variable) use ByRef. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 FYI: Since this topic is about finding the address of an autoit variable, I've began a thread on the dllstruct usage elsewhere.The functions are not designed to be used in that way, so to put it simply they are not managed by AutoIt.thx for not giving up, this sound a little bit more as if you know what you are talking about. no harm meant.BTW, does "Developer" (regarding your forum-title) mean that you are a developer of the AutoIt language itself, or that you are maybe an outstanding, registered or whatever "Developer" of programs using the AutoIt language. Or maybe you also could be a "Developer" of this forum. I am not fully sure what it means. Link to comment Share on other sites More sharing options...
JohnOne Posted September 12, 2015 Share Posted September 12, 2015 Means part of the AutoIt developer team. Some work on actual AutoIt code others others offer different great contributions. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 (edited) I can't imagine situation in AutoIt where pointer to a variable would be needed unless you need to go outside the AutoIt. In that case it's almost mandatory to use dllstruct (COM interface excluded).autocart, can you make an example or maybe explain better?For all other cases (when you need to reference a variable) use ByRef.again, did not see it until posting my post, sorryI am only a very bad hobby programmer, sorry, and as such I was only trying to tranlate this code from ahk to au3:http://www.autohotkey.com/board/topic/55299-strput-strget/?p=592069notice the last code line before the return, where the function recursively calls itself:String := StrGet(&String, char_count, 1200)EDIT: The function should do the same as http://ahkscript.org/docs/commands/StrPutGet.htm Edited September 12, 2015 by autocart Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 12, 2015 Moderators Share Posted September 12, 2015 autocart,Both trancexx and I have asked for an explanation of why you wish to use the address of a variable in AutoIt. Your earlier reply about porting AHK code was less than informative, so how about either posting the code in question or explaining in more detail.M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 autocart,Both trancexx and I have asked for an explanation of why you wish to use the address of a variable in AutoIt. Your earlier reply about porting AHK code was less than informative, so how about either posting the code in question or explaining in more detail.M23Yes, sorry, had not seen her post fast enough. Up above is the link to the original code now. Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2015 Share Posted September 12, 2015 again, did not see it until posting my post, sorryI am only a very bad hobby programmer, sorry, and as such I was only trying to tranlate this code from ahk to au3:http://www.autohotkey.com/board/topic/55299-strput-strget/?p=592069notice the last code line before the return, where the function recursively calls itself:String := StrGet(&String, char_count, 1200)I'm not familiar with syntax of AutoHotkey, but from I gather that's typical example where you would need to use dllstruct in AutoIt. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 but from I gather that's typical example where you would need to use dllstruct in AutoIt.Woah,... *shock* .... it is? And in this case it also would be safe to do it?Please, allow me the question: How do I then determine when it is safe and when it is not? Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2015 Share Posted September 12, 2015 Woah,... *shock* .... it is? And in this case it also would be safe to do it?Please, allow me the question: How do I then determine when it is safe and when it is not?Why are you shocked? It's really very simple. Read this. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 Thx for the link and anyway for all your replies, trancexx.The basic reasons that I saw you explaining there, seem to be: "Using dllstructs that way goes directly against the typing paradigm of the language. On top of that dllstruct is not safe type because data is also accessible through pointer."Honestly I don't understand the dangers in either. But that may be because I am only a bad hobby programmer. I mean - no harm meant - who cares about typing paradigms or "safeness of type regarding accessibility through pointer", unless it could be accessed through pointer accidently and then make me loose data or even worse cause my windows system to crash and loose the current windows session (blue screen & loss of currently not saved data). If that is not the case, I don't know what should be "unsafe" about it?What I wonder about is, maybe you and your colleagues speak heavily against its widespread usage, because otherwise it would spread throughout scripts on the net and be a bother to stumble upon / work with and maybe cause uncontrollable side effects like in Terminator, or so. ;-) If this is the case, then just say so and I would understand.Thanks again for your help, in any case. Regards, Stephan Xandy and trancexx 2 Link to comment Share on other sites More sharing options...
JohnOne Posted September 12, 2015 Share Posted September 12, 2015 I don't think skynet will arise as a result of using DllStruct wrong. mLipok 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 Oh, ah, I think it just clicked.You also said in the other thread: "It's very simple, if you are using dllstruct with/for anything that doesn't absolutely need it then you are abusing it."If I read it correctly, the emphasise could be on "with/for anything that doesn't absolutely need it". So, if I think I need it and can't find another way of how to achieve the desired functionality, then will always be completely ok to use it, right? In connection of the above together with this thought it now makes (enough) sense to me. Hope I am right. Thx again for your patience. Link to comment Share on other sites More sharing options...
trancexx Posted September 12, 2015 Share Posted September 12, 2015 Excellent. You nailed it....Go away now, I'm starting to like you. Shoo! autocart 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
autocart Posted September 12, 2015 Author Share Posted September 12, 2015 (edited) ok - I am g o n e ..... Edited September 12, 2015 by autocart Link to comment Share on other sites More sharing options...
haijie1223 Posted July 25, 2019 Share Posted July 25, 2019 Ahk support & * operations,support custom class . au3 develop too slow。 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now