Jump to content

[SOLVED]SCITE save File Property "Tags"


Go to solution Solved by Melba23,

Recommended Posts

Posted (edited)

Have routine that gets and sets Windows 10 .au3 File Properties "Tags", When editing these .au3 files with SCITE, it clears the File Properties "Tags" field. Use UDF _FileGetProperty to fetch, and wrote _FileSetProperty which uses autoit mouse functions on explorer files to open properties and key enter new tag.  Using Windows Version 1909, Autoit 3.3.14.2, SCITE 3.7.3.0. Would like to know if maybe newer versions of SCITE would support retaining File Properties. Thank You

Edited by Bitpicker
Link to post
Share on other sites

My _FileSetProperty function starts with windows explorer selection using UDF _GetExplorerSelection(), then standard keystrokes  using Explorer context "Properties" selections which opens Properties window , the DETAILS tab which shows Tags and can then entered / change tag. I do not have the need, and do not try to manage multiple tags etc, So I know it is not General Purpose. It does not use system calls. just the standard graphics. 

Link to post
Share on other sites

Yea verily, I do have the option. I can do it manually and have the script written and it works. Started with __FileGetProperty code and do not use it all as it deals with multiple files, etc.

Func _FileSetProperty($FSP_Path, $FSP_PROPERTY = "Tags", $FSP_VALUE = "", $iPropertyCount = 500)

Func _FileSetProperty($FSP_Path, $FSP_PROPERTY = "Tags", $FSP_VALUE = "", $iPropertyCount = 500)
'  Do not use $iPropertyCOunt currently - only doing single file at a time 
    If $FSP_PROPERTY = Default Then $FSP_PROPERTY = ""
    $FSP_Path = StringRegExpReplace($FSP_Path, '["'']', "") ; strip the quotes, if any from the incoming string
    If Not FileExists($FSP_Path) Then Return SetError(1, 0, "") ; path not found
    WinActivate("[TITLE:AUTOLogs; CLASS:CabinetWClass]", "")
'  Key sequence
  Send("+{F10}")  ; Right Click Open Options window
  Sleep(500)
  Send("r")     ; Select Properties
  Sleep(500)
  Send("^{TAB 2}") ; Details Tab
  Sleep(500)
  Send("{UP 5}")    ; Select Tags Property
  Sleep(500)
  Send("{BS 2}")    ;  Clear Current Tag
  Sleep(500)
  Send($FSP_Value) ; TYPE NEW TAG    - 
  Sleep(500)
  Send("{ENTER}")    ; Enter to Set Tag Entry
  Sleep(500)
  Send("{ENTER}")     ; Enter to SET FILE Tag Property  abd close Properties Window    
EndFunc

Have Not finished with this code, and may be minor error above as I extracted the main code form what is working.  I currently do a single file and have a front end GUI that gets the current Tag for highlighted explorer file, allows user to radio select the valid Tags that I use, updates that Tag on my Gui Button select, and waits for user to select next file in explorer - repeat until exit. So, each time I edit one of those scripts with SCITE I have to reset the Tag, hence the request to see if SCITE can save at least the "Tags" property.

Link to post
Share on other sites
  • Developers
Posted (edited)

I am still not onboard with being able to update Details of an .AU3 file on a standard Win10 installation as there is no tags option:
(It is Dutch but there is no option to add any Tags as far as I know)

image.png.d8a7baf976b54d10495376564fe4ed1d.png

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Moderators

Bitpicker,

What OS are you running? When I use Shft-F10 to open the properties of an .au3 file on my Win 10 machine I need to use different keystrokes to you to get to the Details tab - for example "o" and not "r" to open the Properties dialog. And when I do open it, it looks exactly like Jos' image (except in English and not Dutch) - no "Tags" element visible.

Or are you using some form of Explorer shell which offers more functionality?

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites
  • Developers
Posted (edited)
10 hours ago, Bitpicker said:

Ich can Nicht Deutsch Sprecken, aber

Funny, I've had this a lot while visiting your country that Dutch are confused with the German (Deutch). ;) 

Anyway: Have you added a tool to be able to add these tags? 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Using Windows 10 PRO, Version 1909 OS Build 18363.1500.  I have no explorer shell. I have not mucked around with the OS at all. Stumbled on the _FileGetProperty() and digging further someone said there was no _FileSetProperty() that led me on to the "+{F10}". Not to handy here with the pics, will post the image after shift f10. Notice that I do have link to my "FileTagMaint" routine  in the context. Also, my earlier pics show "ALOG" as my tag, and you can see in the explorer window that there is an ALOG(13) tags section. I apologize for the Deutch for Dutch, Guess it's my heritage coming thru. Appreciate both your input on this.     image.thumb.png.a7d4007f1289df81fdb06723f6702581.png

N

Link to post
Share on other sites

Just a thought, This machine started with WIN 7 Pro and I upgraded to Win 10 Pro when it became available. ?Maybe something from original Win 7? Also, you will see I have added a couple other my own routines to the Shell register; AcctScriptMaint,BackLinkaFile2Quicken,ConvertiMacroScript and FILETAGMAINT. All other entries are form Program installations of OS

Link to post
Share on other sites
  • Moderators
  • Solution

Bitpicker,

It seems that only certain types of file have this "Tags" field in their details - I can see and edit it for a .jpg image and on various flavours of Office files but most other file types do not show the field.  It seems that some applications add file types to the "taggable" list - I found this article which gives an in-depth explanation of the whole "Tag" subject.

So it would seem to me that you have somehow added .au3 files to the "taggable" list, but SciTE does not expect this metadata to exist and so does not know anything about saving it once the file is edited. Your best solution would appear to be to ask the SciTE developers to add such a functionality to the application - our version is a slightly modified build to ease AutoIt integration and something like this is well beyond that level.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to post
Share on other sites

Melba23 and Jos - Thanks for the good work. M23 appreciate the article on tagging - will review carefully. Do not recall doing anything specific to add .au3 files to tagging so do not know where my ability to tag .au3 came from. I do know other file tagging, but just started this tagging to support an autoit application area that moved au3 files to the top of the explorer and others in less catargories(Tags). I have other means of positioning easy handles to these .au3 programs. Your referenced article, from my brief scan of it, shows that it is not mainstream and usually makes more user work than it solves as Tags are often dropped by various software.  So, it would seem to be my choices:

1) freeze my Win10 environment so .au3 Tag Get and Put continue to work,

2)Update after each SCITE edit or Convince SCITE to add this Metadata to there edit and make that available to your version

3) Drop .au3 TAGGING and use other methods to Organize,Order my .au3 files for this application

I am thinking Option 3 - Thanks for looking at the question and the feedback. Will Close on your response. The Old Bitpicker

 

Link to post
Share on other sites
  • Developers
Posted (edited)

Are you loosing the Tags when just editing with SciTE after a Save or is this only happening with Tidy/Au3Wrapper?
Are you using the Lite of the Full SciTE4AutoIt3 package?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

I lose the tag after a save from edit in SCITE. The SCITE.exe is in my Program Files(86)\AUTOIT\SCITE folder and shows Ver 3.7.3.0. I see that I  have downloaded at some time SCITE4_3390 on 1/17/2018 and SCITE_Installer on 2/16/2016. Do Not know when I last installed or updated. If I should update SCITE, could you please suggest what the download should be and how to proceed. Again Autoit.exe is  3.3.14.2. Been working with this environment for quite some time with no problems. Thanks again for your time, Maybe taking back my comment above, as once I get the .au3 routines settled down, with "Tags" and will not be editing as often, my problem of re-TAGGING after edits will go away.

Link to post
Share on other sites

I believe I am using the Lite or SCITE that is included in the Autoit3 package and not a separate download or install, but do not know how to confirm. The exe's I use are what I posted from their detail.

Link to post
Share on other sites
  • Developers
Posted (edited)

Just run a script and show me the SciTE console output so I can check.....and what about the other question?  Do you lose the tag on a some saved of the script ?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Just compiled my FileTagMaint.au3 program. Here is Console output.

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "G:\WAGSPROGS\AUTOLogs\$FILETagMaint.au3"
+>17:53:16 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\jpwags\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\jpwags\AppData\Local\AutoIt v3\SciTE
-> No changes made..
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:G:\WAGSPROGS\AUTOLogs\$FILETagMaint.au3
+>17:53:21 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "G:\WAGSPROGS\AUTOLogs\$FILETagMaint.au3" /out "C:\Users\jpwags\AppData\Local\AutoIt v3\Aut2exe\~AUCAD6.tmp.exe" /nopack /icon "G:\WAGSPROGS\AUTOLogs\$FILETagMaint.ico" /comp 2
+>17:53:22 Aut2exe.exe ended.C:\Users\jpwags\AppData\Local\AutoIt v3\Aut2exe\~AUCAD6.tmp.exe. rc:0
+>17:53:22 Created program:G:\WAGSPROGS\AUTOLogs\$FILETagMaint.exe
+>17:53:23 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 7.83

If I now do a file save to the .au3 source, I will lose the TAG.

Link to post
Share on other sites
  • Bitpicker changed the title to [SOLVED]SCITE save File Property "Tags"

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...