Jump to content

Sunaj

Active Members
  • Posts

    186
  • Joined

  • Last visited

Sunaj's Achievements

Prodigy

Prodigy (4/7)

1

Reputation

  1. Here's the de-facto best implementation(s) of Windows Explorer for AU3: '?do=embed' frameborder='0' data-embedContent>> The code is a bit.. peculiar.. but works fine once you get your head around the folder structure the author has used for this project. Good luck.
  2. Is it possible to "_Copy_MoveDir" a folder into a folder, without including the source folder? Or to state the question differently: is it possible to rename the source folder directly into the destination folder? Note: I may be doing this wrong but I cannot make this work right which has caused me to resort to crude post-move DirMove / DirRemove combo.. which honestly sucks.
  3. Thanks for the write-up Lars, I thought as much in regards to the extra work you would have had to commit to allow post-XP functionality full exposure in the examples! As a sidenote I just ran into interesting issue with the ExplorerWindowClose() function when compiled - sometimes I needed to exit the program without doing the full initialization of the Explorer window (due to _Singleton() use) and in these instances I would get "Object error" message but only on compiled exe. I modified your function mildly and it works for me: Func ExplorerWindowClose() If $hExplorerWinHook <> '' Then _WinAPI_UnhookWindowsHookEx( $hExplorerWinHook ) $oIExplorerBrowser.Unadvise( $iBrowserEvents ) $oIExplorerBrowser.Destroy() OleUninitialize() DllClose( $dllOle32 ) DllClose( $dllShell32 ) DllClose( $dllShlwapi ) DllClose( $dllUser32 ) EndIf EndFunc Hoping you'll find time / will to keep updating this library: it provides critical functionality for Autoit community in my opinion!
  4. I just fiddled about a bit with viewtype and found the following additional flags info important (I needed Windows 7 "Large Icons"-view myself), I am using WIn7-Classic theme on 64bit machine and used the "Vista, 7, 8.au3" code to find following settings ; 1 = medium, 2 = small, 3 = list, 4 = details, 5 = medium-icon, 6 = medium-icons+details, ; 7 = filmstrip (for Win7 classic theme equals "medium-icon " again), 8 = content, 9 = large-icons $v_mode = 9 DllStructSetData( $tFOLDERSETTINGS, "ViewMode", $v_mode ) ; or for initializing: ExplorerWindowCreate( 0, 0, 0, 0, $hGui, $dir, $dir, $FWF_NOSUBFOLDERS, '', 1, $v_mode ) Thanks for writing all of this brilliant code to begin with LarsJ - I don't blame you if you can't be bothered to update with this extra flag (9) in documentation! Also, my distinction between medium and large icons may well be a Win7 thing only, I no longer remember clearly how WinXP did these things in detail.
  5. Ah so simple, thank you. After writing code to accumulate/calculate conditional probabilities (in PHP) I was stuck on how to combine them, this solves it nicely (and makes a good case for learning a bit of basic math notation), here's the fixed code in case someone should stumble on this subject down the road: $prbs = 0.60 * 0.72 $dividers = ((0.60*0.72))+((1-0.60)*(1-0.72)) $result = $prbs / $dividers ConsoleWrite('$result: ' & $result & @CRLF)
  6. Just trying to wrap my head around some (very) basic math here by converting it into AU3 syntax, on this page (http://www.paulgraham.com/naivebayes.html) there is a good example of how to add two, or more, probabilities together. Here's the short version: Now, any takes on how I would implement that simple math in autoit code? For now I've got: $prbs = 0.60 + 0.72 $dividers = ((0.60+0.72))+((1-0.60)+(1-0.72)) $result = $prbs / $dividers ConsoleWrite('$result: ' & $result & @CRLF) And the output is "0.66" which certainly isn't right so I'm doing something wrong, any takers/helpers on this problem?
  7. Very very impressive! Thanks for sharing and posting, really appreciated. My initial notes are not many but as follows: Installer works fine on Win7 32bit with classic theme enabled There's a slight glitch when installing in Portable Mode where "Apply the following configuration" is placed on top of a boundary box When I first open the demo project there's Info box that is still in German "Willkommen im ISN..etc." Last.. WOW. Again: impressed here. The resource-meter when running code is superb (and that is just one of many many features, will write again when I had chance to test more properly)
  8. Unfortunately not, it is the 1.04 build and reports an "array variable has incorrect number of subs..etc"-error on Line 23620, the source provided is unfortunately not in build state and even after I spend the time extracting the the resources and getting the source to build.. well, lets just say the non-compiled version quits without the line-number indication (one of the (in)-famous: "AutoIt3.exe ended.rc:-1073741819" style things). So.. ideas are welcome! update: prompted by this conversation I tried installing autoit-v3.3.9.4 and running the source with that instead of the stable branch (v3.3.8.1), it yielded results, I have not got the time to look at it now debugging wise but thought I would leave the data here in case anyone is interested: "C:\ArchiveAutoIt\Form Builder Source\FormBuilder_ControlManagement.au3" (273) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $hItem = _GUICtrlTreeView_AddChild($hTree, $TreeItems[$NameIndex], "UpDown" & $ControlNum) $hItem = _GUICtrlTreeView_AddChild($hTree, ^ ERROR
  9. Yes, my work is backed up but I can't open the file? AlI the same, I am well aware that the project is in beta stage and I can't see myself writing anything off at all in regards to this project (I certainly do hope Buckmaster will have the time/energy to continue work on Form Builder!). Simply telling cautionary tale - this is after all a tool that people are likely to use despite its beta status.
  10. @Aktonius, my experience is at the moment is completely opposite; as long as I very accurately specify all the names/handles..etc. that I want in Koda and then proceed to copy ONLY the Region material into my scripts it works brilliantly (granted I've had to work around a few quirks but hey; this is programming.. try any other language/system and you're likely to run into a new set of technical headaches, the objective is to work around/with them without acquiring a headache oneself!).
  11. Hmm, yes; but after having "lost" about 2 hrs gui-work that I saved in a *.gui file that now causes Form Builder to crash on opening.. Well, lets just say I'm back on Koda which honestly is far more stable and predictable for me to work with. (also the *.kxf files are easy to read non-obfuscated XML which is a definite plus in my book, especially when things go awry (experience shows that they will at some point!)).
  12. Are you using/looking-at jaberwocky6669's code? Might be good for syntax highlighting inspiration, be sure to post your results if you continue with your efforts regarding SciTE/TCC. SciTE and LUA are such versatile tools, very nice to work with in combination.
  13. Sure, here goes (filled it in with original author's name/url for transparency): -- Description: -- "table_contains" returns boolean true if the value passed to it is found in the table passed to it -- Parameters: -- table - table to check -- element - value to check for in table -- Author(s): -- Wookai (use in CalltipsOnMouseHover.lua by Sunaj) -- url: http://stackoverflow.com/questions/2282444/how-to-check-if-a-table-contains-an-element-in-lua
  14. Thanks, although practically I will have to add another bit to make the whole thing work; when I posted above code last night I forgot this little helper function which is needed to do the table_contains check: function MouseHoverCallTips:table_contains(table, element) for _, value in pairs(table) do if value == element then return true end end return false end
  15. Another nugget spotted: if you are using a function in an included file (say include.au3) that is written in out in the mother script (main.au3) then the calltip fails to show up when browsing the include file, after a bit of debugging I noticed that the main.au3 script was not being put into the "self.IncludesTable" and hence no joy. Here's a modified version of get_includes_list that makes it work fine on my end: function MouseHoverCallTips:get_includes_list(file_path, accumulator) -- If file_path only contains a filename then prepend a file path if not string.find(file_path, "^%a:\\") then file_path = props["FileDir"] .. '\\' .. file_path end local file = io.open(file_path) if file then local include_name = '' for line in file:lines() do if string.len(line) > 0 then include_name = self:get_include_from_line(line) if string.len(include_name) > 0 then table.insert(self.IncludesTable, include_name) end end end end -- new bit start local index = file_path:match'^.*()\\' local file_clean = string.sub(file_path, index+1) if not self:table_contains(self.IncludesTable, file_clean) then table.insert(self.IncludesTable, file_clean) end -- new bit end if accumulator == #self.IncludesTable then file:close() self.IncludesTable = self:filter_duplicate_entries(self.IncludesTable) end return true end On a side note: your code has helped me getting started with Lua, appreciated. Edit: formatting redone on code paste
×
×
  • Create New...