-
Posts
28 -
Joined
-
Last visited
Everything posted by ValentinM
-
Another AutoIt extension for Visual Studio Code
ValentinM replied to genius257's topic in AutoIt Projects and Collaboration
Hi Sven, thanks for your detailed explanations, I didn't know about this feature. Yes, I was talking about Ctrl+Shift+F (and Ctrl+F as well depending on context). Even if this feature is very useful, I still think it shouldn't be the default behaviour (still in my opinion) as when I "Ctrl+Click" a variable, I'm used to instantly reach its definition. But yes, this feature should be available. Regards ! -
Another AutoIt extension for Visual Studio Code
ValentinM replied to genius257's topic in AutoIt Projects and Collaboration
I disagree, why not use Ctrl+F to navigate between occurrences ? -
FYI, this feature doesn't come from VSCode itself but from GitHub Copilot, which is an AI helper using GPT-4 that predicts code based on your files (I can't remember if it sticks to the current file or more, but it was originally supposed to only read the current one). It not only predicts the right includes but is also excellent at making loops, filling arrays, etc. However, it can be quite bad at other tasks. It learns from your code and can read your comments, so you can implicitly give it directives. For example: So keep in mind that it could mess with the includes as well. But I use it daily, and it helps me more than it hurts my brain 😀 In the past, you had to be a student, teacher, or pay for access to Copilot, but I can see on their website that it has become free. To use it, you have to install this extension and probably sign in or sign up for a GitHub account. EDIT : Autocompletion is made by pressing TAB.
-
The power of VS Code is in extensions. You want bookmarks ? Install Bookmarks. Or maybe you would like a "session" system just like in SciTE ? Install Save and restore tabs. You also can open .csv files, and color them with Rainbow CSV for a better reading experience, or even use Git(hub/lab) straight into it. Copilot can help too, and since it reads your open files, we have to admit that it works pretty well. These are some extensions I am using, I hope it will be useful for someone.
-
I’ve been using PhpStorm and VSCode for a few years now, and I couldn't get used to SciTE (although I use it occasionally because of its lightweight nature). That’s why I managed to make things work with @genius257's extension, as Damien’s version was old (not updated since a long time when I tried it) and highlighting all our base code in red (since we’re using OOP and multiple files in my team). The extension fits my needs perfectly. Additionally, I developed my own extension to open the AutoIt Help when I press a shortcut, with the function under the cursor automatically selected in the Help GUI. I also released an update today (what a coincidence !) to support UDF .chm files: AutoIt Tools (not a big work as a debugger, but I needed it). EDIT : (add) -> I managed to use VSCode's tasks, preLaunchTasks and launch settings to automatically start Au3Check before compiling so I have no issues.
-
Hello Melba, Today I was doing the final tests of my application, and I encountered a case I did not expect to fail. I have a function that deletes columns, using your _GUIListViewEx_DeleteColSpec() function. Unfortunately, when I try to delete the last column of the Listview, I get this error : I've been able to fix this on my side, just by doing "if columns count is = 1 then abort", and it is not currently a problem in my app. Anyway, I think it deserves a fix in the future version. Are you able to reproduce the issue ? I wish you a Merry Christmas, take care !
-
This was the answer for me. I was getting the MsgBox "Error opening libcurl.dll", until I added the libcurl.dll and libcurl-x64.dll parent folder to my system environment variables. I am using VS Code (with launch.json and task.json to debug), and as my team is using SciTE they didn't have the issue (probably due to SciTE environment variables). Hope it can help someone in the future !
-
Hello Melba23, it seems to work wonderfully. Your work is very useful to me, and your bug fixing work is just as useful. I wish I could better understand how your code works and maybe sometimes give you some bugfixing snippets in case I find any issue in the future, but I unfortunately just don't have the time to study your entire code - I'm just using it. Thank you very much !
-
Sure, I will be patient. If I can find something I'll comeback here but I don't know if I'll have the time either. Take care!
-
Melba23, thank you for your reply. Unfortunately, your beta doesn't fix the issue on my side. I don't notice any change in the behaviour I described yesterday, except that if there are too many columns in the listview to fit on the GUI (so you have the scrollbar at the bottom), there is another issue. For example, if you have "Col 0, Col 1, Col 2, Col 3,..." and many others, and you try to move Col 2 to Col 0 then you will have Col 2, Col 0, Col 1, Col 3,... But then, if you try to edit "Col 0", it will automatically "scroll" the listview so you will only see "Col 0, Col 1, Col 3,..." and you have to scroll back to "Col 2" to see it. And each time you want to edit "Col 0", it will do that scroll. And the edit field is still located on "Col 0". I don't know if I am very clear so if needed I can try to reformulate or even take screenshots.
-
Hello, I think I found an issue. If I drag & drop the first column elsewhere, the edit input field linked to it will stay at the first column location. I noticed it while adding a column to my file, and trying to edit some cells. I don't know how I could miss that before now. This is what I get for example when I double-click on the first row, straight under the "hi" column. Take a look at the input field width, which is exactly the same as "hi" column one.
-
I don't know what you call "modifiers" so I will try to go a bit deeper in details to be clear. I have two functions that manages my hotkeys, StartHotkeys() and StopHotkeys(). So the only thing I do to get my Hotkeys firing my functions is for example : HotKeySet("{DELETE}", "DeleteRow") And sometimes in the app, I don't want the Hotkeys to be on (ie. when a file is loading, if my GUI doesn't have the focus,...), so when it happens I use StopHotkeys() that basically does the same thing without calling a function. HotKeySet("{DELETE}") Did I answer you correctly? EDIT : Just googled "modifiers" and seems like it's just like pressing "Shift" or "Ctrl"... So I am not using modifiers for deleting rows.
-
Thank you M23, I have a better understanding now. This is a better idea, and if I don't misunderstand, it will save some resources as this function will not check every time if there is an ongoing edit process. I successfully implemented your function, this way : Func DeleteRow() If _GUIListViewEx_EditProcessActive() <> 0 Then StopHotkeys() Send("{DELETE}") Return EndIf If _GUICtrlListView_GetSelectedCount($iIDListView) > 0 Then ; My delete code Else ; Error case EndIf EndFunc The only thing that bothers me is that I need to manually send the 'DELETE' key to my GUI. Otherwise, the first 'DELETE' keypress will not delete a char in the edit field. PS : The function you typed in your example doesn't match the function in your UDF ( _GUIListViewEx_EditProcess() -> _GUIListViewEx_EditProcessActive() ).
-
Thank you M23, I tried your new UDF. I placed this snippet on the top of my GUI loop, and I have to say it doesn't work properly. Local $test = _GUIListViewEx_EditProcessActive() ConsoleWrite("$test = " & $test & @CRLF) If $test = 0 Then $oLog.TracerLog("Not editing, $test = " & $test) $bEditingCell = False Else $oLog.TracerLog("Editing, $test = " & $test) $bEditingCell = True EndIf This code is spamming my debug console of "Not editing, $test = 0" which is okay. But when I start editing, it seems that the GUI loop stops until I exit the cell. Is it a behaviour you can reproduce ? If not, it would probably mean that some of my code is interfering with yours. I'm investigating.
-
I am using a hotkey to delete some rows, and I would like to disable this hotkey while editing to avoid triggering the DeleteRow() function and also allow user to use the Delete key in the edit cell. Thank you.
-
Hi, Can I ask if there is any way to check if the Edit process is undergoing ? I am actively using _GUIListViewEx_EventMonitor() function, but it seems like @extended is updated after the editing process has ended (ie. when we exit the edit cell). I tried searching in the UDF for any Global boolean or variable that could fit my needs by checking their values (like $hGLVEx_Editing, $cGLVEx_EditID and $fGLVEx_EditClickFlag) , but I couldn't find any. I also tried to find my answer in this topic. On the other hand M23, do you have any Github link to this project ? So we would be able to see changes, revert versions in case of issues to test if an issue is due to a mistake from our side, or even make pull requests and (maybe) save you some time (even if i don't know if you're in lack of time due to how fast you usually answer!) Thanks in advance.
-
Hi M23, I tested your code this morning, and I can say it solved the issue. I was about to say that it also happens by deleting columns but I can see you also applied your fix to the DeleteColSpec function. Much thanks for this update. I'll keep using it and will report any troubles I find (If I ever do!) Have a great day !
-
Hi, I'm using your UDF since yesterday. Thank you very much for sharing this great work. I am using it this way, to build an Excel-like app. $iIDListView = GUICtrlCreateListView("", 0, 100, WinGetClientSize($hGUI)[0], WinGetClientSize($hGUI)[1] - 120, $LVS_SHOWSELALWAYS) $hListViewHandle = GUICtrlGetHandle($iIDListView) $aLV_Content = _GUIListViewEx_ReadToArray($iIDListView) _GUICtrlListView_SetExtendedListViewStyle($hListViewHandle, $LVS_EX_BORDERSELECT + $LVS_EX_FULLROWSELECT + $LVS_EX_DOUBLEBUFFER + $LVS_EX_HEADERDRAGDROP + $LVS_EX_GRIDLINES) $iLV_Index = _GUIListViewEx_Init($iIDListView, $aLV_Content, Default, Default, Default, BitOR(2, 4)) _GUIListViewEx_SetEditStatus($iLV_Index, "*") _GUIListViewEx_MsgRegister() However, when I add a column with the following code, the ListView suddenly becomes sortable (and I don't want it to be) : Local $result = _GUIListViewEx_InsertColSpec($iLV_Index, 0, $sNewHeader) Is it from my side ?
-
Another AutoIt extension for Visual Studio Code
ValentinM replied to genius257's topic in AutoIt Projects and Collaboration
Hi genius257, Thanks for your fast reply ! I don't know much about VS Code Extension, would it be hard (or even possible) to detect variables in other files, especially those who are included (#include) ? I did a lot of things yesterday, so I don't remember exactly what was the problem I experienced, but I had an issue with it. I'll try it again by the end of the week. I'm very happy to read this ! It will be so useful. I found an alternative way by installing AutoIt VS Code Extension by crstein, and disable all extension's shortcuts in settings to avoid conflicts with yours, except the one who's opening the doc. The only inconvenience is I need to select the entire function and then press Ctrl+F1, instead of just having my cursor anywhere on the function. -
Another AutoIt extension for Visual Studio Code
ValentinM replied to genius257's topic in AutoIt Projects and Collaboration
Hi, thanks for your great work. I tried to find something to use VS Code, as I am used to it. For some reason, Damien's extension is highlighting a lot of my code due to unreachable functions, since I'm developing in multiples files at once and calling functions outside their files. As I couldn't find a fix, I tried yours. I have to say that it fills all my needs. Lack of debug console was a problem for me ; I fixed it by making a task in my tasks.json that runs Au3Check.exe, and a custom launch.json that runs the task and the script. It works like a charm ! I can even ctrl+click on the error in debug console to get on it. The only trouble I'm struggling to fix is I cannot manage to print special chars in my debug console. My files all are encoded in UTF-8, I've searched in extension settings, tried few parameters in settings.json,... Here's what kind of thing I get : D�marrage de l'application Also, is there any quick way to access to the doc while hovering a function ? just like Damien's extension by pressing ctrl+f1 or SciTE by pressing F1 ? I tried some shortcuts but didn't manage to get it working. Thanks again for your work @genius257 ! -
Hello, I'm using SciTE and AutoIt since 2 weeks at work. Our current security measures here doesn't allow users to have their main accounts Admin on the computer. When I want to do something that requires elevation, I need to try to execute it, wait for Windows to ask for elevation and enter my admin login/pass. For most cases, it's working pretty properly, but I think this is doing a mess with SciTE. As you could see in the title, abbreviations aren't working at all, I even tried to fully uninstall AutoIt and SciTE and reinstall it properly. The abbreviations actually are detected (highlighted in red) but pressing space literally does nothing. Each time, I end with some files in my Program Files, and some in the Admin Account AppData. Nothing in my regular user AppData (seems fair). In the Program Files, it seems to miss some files : I found "Run AutoIt3/SciTE check" under "Other Tools" inside "SciTE Config" and this is what I get : ****************************************************************************************************************************************** * HKCR\.au3 Default : AutoIt3Script * HKLM\SOFTWARE\Classes\.au3\ShellNew: C:\windows\SHELLNEW\Template.au3 (File Exists) * HKCR\.au3 ShellNew : C:\windows\SHELLNEW\Template.au3 (File Exists) ****************************************************************************************************************************************** * Explorer shell options: * HKCR\AutoIt3Script\shell: * => Default Action:Open * Compile => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l" * Compile with Options => Command:"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /in "%l" * CompileX64 => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe_x64.exe" /in "%l" * CompileX86 => Command:"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe" /in "%l" * Edit => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1" * Open => Command:"C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe" "%1" * Run => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %* * RunX64 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe" "%1" %* * RunX86 => Command:"C:\Program Files (x86)\AutoIt3\AutoIt3.exe" "%1" %* ****************************************************************************************************************************************** * User SciTE info: * Portable:C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig: * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\Au3Stripper * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\AutoIt3Wrapper * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\CodeWizard * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\SciTE Jump * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\SciTEConfig * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\Tidy * File missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\Aabbrev.properties * File missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\au3abbrev.properties * No SciTEUSer.properties yet ****************************************************************************************************************************************** All those "missing files/folders" are inside the Admin AppData folder, except SciTE Jump. When I copy them, I still have those lines : * User SciTE info: * Portable:C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig: * Directory missing: C:\Program Files (x86)\AutoIt3\SciTE\SciteConfig\SciTE Jump * No SciTEUSer.properties yet I found this post : And the result of Jos's script is : >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\MyUsername\Desktop\testJos.au3" /UserParams +>11:46:18 Starting AutoIt3Wrapper (21.316.1639.1) from:SciTE.exe (4.4.6.0) Keyboard:0000040C OS:WIN_10/2009 CPU:X64 OS:X64 Environment(Language:040C) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.16.1) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\MyUsername\Desktop\testJos.au3 +>11:46:19 AU3Check ended.rc:0 >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\MyUsername\Desktop\testJos.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. -->:266060:askproperty:au3.keywords.abbrev <--:266060:macro:stringinfo: a3w a3w2 ael aes aretval as aso au3check aut2exe aut2exedir autoit3 autoit3dir awgt awst ba bi bin binl binm bn bo bre bretval bro bs but bx cc ccl cco cd cdt ce ceil cf cg cgf cgh cgp cgt ch chk cl clv cm cmd cmd2 cmdline cmdlineselect cmdlineselect2 cmdlineswitch cmdlineswitch2 cont1 cont11 cont111 cont2 cont22 cont222 cp cr cr1 cr2 cr3 cr4 cr5 cs csh cst cw cwb cwe cweln cwelns cwes cwg cwln cwlnb cwlng cwlno cwlnr cwo cwr cws dat datbeta datfinal dco dcr dgd dgfs dgl dgse dgsi dgt dll dllc dllo dllsc dllsgd dllsgp dllsgs dllssd dm dma dmd dmg dou dountil dr dretval ds dsf dsl dst eclose edt eg el emax emin ereg erestore err error errval es eu exec ext extval fcd fcl fcnl fco fcs fd fe ffff ffnf fga fgln fgsh fgsi fgsn fgt fgv fi flo fm fo fod for0 for0ub for0ubn for1 for1c for1ub for1ubn fornext fornext2 fr frc frce fread freadb frl fsa fsd fsf fsp fst fun funcont functions funex funex123 funwrap fw fwl fwrite fwriteb gc gcc gcca gccb gcccb gcccm gccco gccda gccdu gcce gccg gccgc gccgr gcci gccico gccla gccli gccm gccmc gccmi gcco gccpi gccpr gccr gccs gcct gccti gcctic gcctv gcctvi gccu gcd gcgh gcgs gchecked gcr gcrlvs gcrm gcs gcsbc gcsco gcscu gcsd gcsf gcsgr gcsi gcsl gcsm gcsoe gcsp gcsr gcss gcsst gcst gcstd gd gdisable genable gfocus ggci ggm ghide grm gs gsa gsbc gsc gscu gsf gsg gsh gshow gsi gsoe gss gsw gunchecked hkcc hkcr hkcu hklm hks hku hnd hsp ib ic icon icondir id ifelse ifelseif iferrc iferrcln iferrmsg iferrmsg2 iferrmsg2ln iferrmsgln iferrset iferrset2 iferrset3 ifextc ifextcln ifthen ig igi igs incl incl1 incll include includedir includeonce inp ir iretval irs irsn isad isar isbin isbo isd isdll isf isfn ishw isi isk ism isn iso isp iss item iw iws lbl lf1 lf2 lf3 lf4 lf5 lvw mb mb2 mbe mbe2 mbe2ln mbeln mbi mbiln mbqn mbqnln mbqy mbqyln mbw mbw2 mbw2ln mbwln mc mcd md men mgc mgp mgs mm more moremsg mu mw nti num oae oaer oas oasr ocr oev oge options pc pcs pe pgc pl poff pon prag prg ps pset psp pw pwc ra rad rael raes raw rd rdm reg reg2 regdat regkey regval rek result retseterr retval rev rnd rr rwa rwael rwaes rwr sacr say sbgt scite scitedir sco sd se selectcase selectloop selfdelete ser setupgui sex sexec sexecw sf sia sian siascii sid sif sii sil sio sioc sis sisp siu siw sixd ska sl sld slen slower slp slp0 slp1 slp2 slp3 slp4 slp5 sm so sor sp sr srep srex srexr ss sscr ssws sswv stbin stl sto str stri supper switchcase switcherr switchext switchloop tab tab1 tab2 tab3 tab4 tab5 tci tcm tcpa tcpc tcpcs tcpl tcpntip tcpr tcps tcpsd tcpsu td ternary tgm ti tid tigh tigs tigt tisoe tiss tist toolt trayi traym trv tsc tsi tsoe tspi tss tstt tt ub udpb udpcs udpo udpr udpsd udpsu version vretval wa wat wc we wf wgcl wgcp wgcs wgh wgpo wgpr wgs wgte wgti whilew whilewend withe withendwith wk wl wm wma wmau wmsi wsot wss wst wstr ww wwa wwc wwna -->:266060:askproperty:au3.keywords.userabbrev <--:266060:macro:stringinfo: -->:266060:askproperty:keywords7.$(au3) <--:266060:macro:stringinfo:$(au3.keywords.abbrev) $(au3.keywords.userabbrev) ! Filename:\abbrev.properties -------------------------------------------- Filename:\au3UserAbbrev.properties -------------------------------------------- Filename:\au3abbrev.properties -------------------------------------------- +>11:46:19 AutoIt3.exe ended.rc:0 +>11:46:19 AutoIt3Wrapper Finished. So my guess is that SciTE is configured to talk with the Admin AppData and not my non-elevated account, due to the specific install I made. If I am right, how can I configure SciTE to talk with my own AppData ? Is it the purpose of those "SCITE_USERHOME_ variables ? More generally, how can I repair SciTE, make it work properly with such a configuration ? Thanks in advance, Valentin
-
Hello Jos, That was the issue. The setup on my computer doesn't allow my account to be admin, so I have to manually connect as Admin when I want to install something. So I copied "C:\Users\ADMIN_USER\AppData\Local\AutoIt v3\" into "C:\Users\myusername\AppData\Local\AutoIt v3\", made the changes I wanted to add my shortcut and it finally worked like a charm. Thank you Jos for your help, and ioa747 for letting me know about PersonalTools, I didn't know this at all. Have a great day and I hope this post will help people in the future. EDIT : How can I mark this post as solved ? lol
-