Shanheavel Posted March 21, 2013 Share Posted March 21, 2013 (edited) If you try below code:Assign("Val",-45.961) $sStr = "VAL: " & Eval("VAL") & @CRLF $sStr &= "val: " & Eval("val") & @CRLF $sStr &= "VaL: " & Eval("VaL") MsgBox(32,"Variable",$sStr)you can note that all results are the same.I'd like to make case sensitive variables (I need this for some scripts), where VAL, val and VaL are different. It can be done with array functions, but it's slow and not smart. So I've a question. Is it possible to do this in any other way? I'm waiting for an answer. Edited March 22, 2013 by Shanheavel Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 21, 2013 Moderators Share Posted March 21, 2013 Shanheaval,I'd like to make case sensitive variables (I need this for some scripts)Really? Can you give us an example? 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...
Developers Jos Posted March 21, 2013 Developers Share Posted March 21, 2013 You state you need case sensitive variable names but don't explain why. So, could you shed some light as to why this would be needed? 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 comment Share on other sites More sharing options...
water Posted March 21, 2013 Share Posted March 21, 2013 I'm waiting for an answer.?This is no 24 hours support forum. It's not impossible that you wont't get an answer at all.Have you checked the help file? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Shanheavel Posted March 21, 2013 Author Share Posted March 21, 2013 (edited) @Melba23 and JosI'd like to work with standard system functions, constants and structures. They're case sensitive.@waterI know this isn't forum with 24/7 support, but it would be nice to get fast reply (like now ).I experimented with Assign, EnvSet, DllStructCreate etc. All of them are case insensitive . Edited March 21, 2013 by Shanheavel Link to comment Share on other sites More sharing options...
Developers Jos Posted March 21, 2013 Developers Share Posted March 21, 2013 Could be me but still missing your point. Show me an example where Case sensitive variable names are an issue for you. 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 comment Share on other sites More sharing options...
czardas Posted March 21, 2013 Share Posted March 21, 2013 You can make them case sensitive, but you will need to create your own preprocessor. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
BrewManNH Posted March 21, 2013 Share Posted March 21, 2013 (edited) AutoIt isn't case sensitive in regards to variable/function names. So, whatever it is that you think you need them for, AutoIt won't fit the bill. Although I greatly doubt you need case sensitive variable names, AFAIC I don't think any programming language NEEDS case sensitive variable names, nice to have, but it's almost never a need more than a want. Edited March 21, 2013 by BrewManNH If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Shanheavel Posted March 21, 2013 Author Share Posted March 21, 2013 @JosI think we focused on the my point of view instead the problem. My English is hard to read, but I hope you can understand essence of my statements.Returning to the topic, imagine that you've a list of USER32 library functions. From an ActivateKeyboardLayout to a wvsprintfW.It looks something like this:... $MessageBeep = 0x7E431F7B $MessageBoxA = 0x7E4507EA ...and you want to assign the variable MESSAGEBOXA to 123. Of course, it'll fail, because you only overwrite the MessageBoxA.This explain is good?@czardasI need to write my own preprocessor to AutoIt - closed source language? Is it a joke? @BrewManNHI didn't compare the amount, but I think the most programming language need case sensitive variable name (read C++ or FASM). Link to comment Share on other sites More sharing options...
BrewManNH Posted March 21, 2013 Share Posted March 21, 2013 @BrewManNHI didn't compare the amount, but I think the most programming language need case sensitive variable name (read C++ or FASM).No, they don't need them, they HAVE them, that is not the same thing. Just because they have them doesn't make it a need, it makes it something you have to remember to work around when naming variables. Anyone that states they NEED case sensitive variable names and can't explain in simple terms why they need them, obviously doesn't know what they're talking about.I'm not saying that your lack of skill in the English language is an issue, but you haven't come up with a single reason why you think you need case sensitivity. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 21, 2013 Moderators Share Posted March 21, 2013 As Jos pointed out, the OP needs to show an example of code that breaks because of case sensitivity. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
czardas Posted March 21, 2013 Share Posted March 21, 2013 I need to write my own preprocessor to AutoIt - closed source language? Is it a joke? No it was not a joke. You know how you want the code to respond. Write the code to process the input before it is sent to the closed source interpreter. Why is that a joke? It might be easier to write the code differently. Like everyone else around here, I don't understand your reasons for wanting to use case sensitive variables. So it's the best answer I can offer. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 21, 2013 Moderators Share Posted March 21, 2013 (edited) Shanheaval,I am loath to join in this procession of "WTF?" posts but your example:$MessageBoxA = 0x7E4507EA ... and you want to assign the variable MESSAGEBOXA to 123is the worst excuse I have seen here in nearly 5 years for claiming AutoIt has a problem. Let me offer some reasons why I have a real problem in treating your complaint as a serious failing in the language:- 1. MESSAGEBOXA is not a valid AutoIt variable, so you fall at the first fence. - 2. You decide what to call variables, not AutoIt, so why not use another name which does not depend on case-sensitivity? What forces you to use $MESSAGEBOXA (note the proper syntax) or $MessageBoxA as the name of a variable within your script? Why not change one of the names? There is a very good "search and replace" function in SciTE to amend existing code. - 3. You still have not shown us a valid sample of AutoIt code in which case-sensitivity is an issue. And until you do, I will treat your complaint with the contempt it frankly deserves. So, any advance from your side? Any actual code you can show us that needs case-sensitivity? M23 Edited March 21, 2013 by Melba23 Typo 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...
Shanheavel Posted March 21, 2013 Author Share Posted March 21, 2013 Writing preprocessor to other programming language isn't bad idea, but I just do it. So I can't write preprocessor to preprocessor, because it will very slow. You all ask about code of example. I can say only that I'm making some "tool" written in AutoIt, which convert code in my format to FASM. Latter uses case-sensitivity, first not. And it's hard to bring together both for me, so I asked you. The only thing I came up with is something like this: ... $aValName[3] = "MessageBoxA" $aValData[3] = 0x7E4507EA ... $aValName[34] = "MESSAGEBOXA" $aValData[34] = "bla bla bla" ... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 21, 2013 Moderators Share Posted March 21, 2013 Shanheavel,In that snippet you are using "MessageBoxA" and "MESSAGEBOXA" as literal strings which are case-sensitive in AutoIt, so I still fail to see how the case-insensitivity of AutoIt variables poses a problem. If you do come across a case please do let us know so that we can hep you resolve it - but were I a betting man my money would be on you never producing anything viable in which case-sensitivity poses insoluable difficulties. 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...
czardas Posted March 21, 2013 Share Posted March 21, 2013 I can't write preprocessor to preprocessor, because it will very slow.I would say that depends on your method, and perhaps on the code content to a certain degree. How imperitive is it that you save half a second or even just a few miliseconds before the script runs? Anyway it seems superfluous to do this for anything other than an exercise. I suggest you think of a better alternative - one that's easy to code for. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
AZJIO Posted March 21, 2013 Share Posted March 21, 2013 Shanheavel Assign(StringToBinary("VAL"),-45.961) Assign(StringToBinary("val"), 34) Assign(StringToBinary("VaL"),1) $sStr = "VAL: " & Eval(StringToBinary("VAL")) & @CRLF $sStr &= "val: " & Eval(StringToBinary("val")) & @CRLF $sStr &= "VaL: " & Eval(StringToBinary("VaL")) MsgBox(32,"Variable",$sStr) Shanheavel 1 My other projects or all Link to comment Share on other sites More sharing options...
water Posted March 21, 2013 Share Posted March 21, 2013 Brilliant! My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Shanheavel Posted March 21, 2013 Author Share Posted March 21, 2013 Shanheavel Assign(StringToBinary("VAL"),-45.961) Assign(StringToBinary("val"), 34) Assign(StringToBinary("VaL"),1) $sStr = "VAL: " & Eval(StringToBinary("VAL")) & @CRLF $sStr &= "val: " & Eval(StringToBinary("val")) & @CRLF $sStr &= "VaL: " & Eval(StringToBinary("VaL")) MsgBox(32,"Variable",$sStr) And the winner is... AZJIO! Exactly what I was looking for. I tested and it works. This is why I love this forum. If nobody has to add then I think we can close the thread. Thanks! Link to comment Share on other sites More sharing options...
czardas Posted March 21, 2013 Share Posted March 21, 2013 (edited) Assign(StringToBinary("VAL"),-45.961) Assign(StringToBinary("val"), 34) Assign(StringToBinary("VaL"),1) $sStr = "VAL: " & Eval(StringToBinary("VAL")) & @CRLF $sStr &= "val: " & Eval(StringToBinary("val")) & @CRLF $sStr &= "VaL: " & Eval(StringToBinary("VaL")) MsgBox(32,"Variable",$sStr) Azijo haha: very tricky! Edited March 21, 2013 by czardas operator64 ArrayWorkshop 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