mLipok Posted August 15, 2013 Posted August 15, 2013 I looked through the documentation section "Language Reference / Operators" There are operators described OR NOT AND. So I remembered that there are also other type of XOR and XNOR And here I have a question whether they were taken into account when it comes to adding them to the AutoIT? The following examples. XOR and XNOR Image: https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTq8IO8Ygk-IJ_LHDqmGmW3hFLeImrRVAPPl2SYJ2pktfyf7Sar XNOR Image: '> English: http://en.wikipedia.org/wiki/Exclusive_or English: http://en.wikipedia.org/wiki/Logical_equality Polish: http://4programmers.net/Delphi/Xor Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
James Posted August 15, 2013 Posted August 15, 2013 AutoIt has: BitAND BitNOT BitOR BitRotate BitShift BitXOR Check them out. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
mLipok Posted August 15, 2013 Author Posted August 15, 2013 Thanks but basically I'm talking about this functionality: if Expression1 XOR Expression2 Then ............. EndIf if Expression1 XNOR Expression2 Then ............. EndIf Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
FireFox Posted August 15, 2013 Posted August 15, 2013 if Expression1 XOR Expression2 Then ............. EndIf ;is If BitXOR(Expression1, Expression2) Then if Expression1 XNOR Expression2 Then ............. EndIf ;is If BitNOT(BitXOR(Expression1, Expression2)) Then
mLipok Posted August 15, 2013 Author Posted August 15, 2013 @FireFox Thanks Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
James Posted August 15, 2013 Posted August 15, 2013 @FireFox Thanks You could create your own function to do this: Func BitXNOR($a, $b) Return BitNot(BitXOR($a, $b)) EndFunc Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
mLipok Posted August 15, 2013 Author Posted August 15, 2013 Bad result ConsoleWrite('Result = ' & BitXNOR(_Test1(), _Test2()) & @CRLF) Func BitXNOR($a, $b) Return BitNOT(BitXOR($a, $b)) EndFunc ;==>BitXNOR Func _Test1() Return True EndFunc ;==>_Test1 Func _Test2() Return False EndFunc ;==>_Test2 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
FireFox Posted August 15, 2013 Posted August 15, 2013 BitNOT is not the opposed number, remember that you are working with binary.
mLipok Posted August 15, 2013 Author Posted August 15, 2013 Yes I know but I asking for something like this if _Test1() XOR _Test2() Then ............. EndIf if _Test1() XNOR _Test2() Then ............. EndIf Func _Test1() Return True EndFunc ;==>_Test1 Func _Test2() Return False EndFunc ;==>_Test2 Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
FireFox Posted August 15, 2013 Posted August 15, 2013 Maybe this...;if _Test1() XOR _Test2() Then If Not (_Test1() = _Test2()) Then EndIf ;if _Test1() XNOR _Test2() Then If (_Test1() = _Test2()) Then EndIf Func _Test1() Return True EndFunc ;==>_Test1 Func _Test2() Return False EndFunc ;==>_Test2
AdamUL Posted August 15, 2013 Posted August 15, 2013 (edited) Try this with the Boolean Algebra equation for XOR.ConsoleWrite("XOR Truth Table" & @LF) ConsoleWrite("_XOR(False, False) = " & _XOR(False, False) & @LF) ConsoleWrite("_XOR(False, True) = " & _XOR(False, True) & @LF) ConsoleWrite("_XOR(True, False) = " & _XOR(True, False) & @LF) ConsoleWrite("_XOR(True, True) = " & _XOR(True, True) & @LF & @LF) ConsoleWrite("XNOR Truth Table" & @LF) ConsoleWrite("_XNOR(False, False) = " & _XNOR(False, False) & @LF) ConsoleWrite("_XNOR(False, True) = " & _XNOR(False, True) & @LF) ConsoleWrite("_XNOR(True, False) = " & _XNOR(True, False) & @LF) ConsoleWrite("_XNOR(True, True) = " & _XNOR(True, True) & @LF) Func _XOR($A, $B) ;~ Return ($A And (Not $B)) Or ((Not $A) And $B) Return ($A Or $B) And (Not ($A And $B)) EndFunc Func _XNOR($A, $B) Return Not _XOR($A, $B) ;~ Return ($A And $B) Or ((Not $A) And (Not $B)) EndFunc Adam Edited August 15, 2013 by AdamUL pixelsearch 1
mLipok Posted August 15, 2013 Author Posted August 15, 2013 it works Thanks Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
mLipok Posted August 15, 2013 Author Posted August 15, 2013 I wrote on this group because I thought that such operators could be added to the AutoIT. But the solution as suggested @ AdamUL dispelled all my doubts that a solution is available. Except that I was on it before I got there But at least I have given to this topic thread will make it easy to find a solution to this problem other looking for the solution. ps. I think it is a good piece of code that can be added to a standard UDF, not unless that is already in the standard install of AutoIT Signature beginning:* Please remember: "AutoIt"..... * Wondering who uses AutoIt and what it can be used for ? * Forum Rules ** ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Code * for other useful stuff click the following button: Spoiler Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST API * ErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 * My contribution to others projects or UDF based on others projects: * _sql.au3 UDF * POP3.au3 UDF * RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF * SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane * Useful links: * Forum Rules * Forum etiquette * Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * Wiki: * Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX IE Related: * How to use IE.au3 UDF with AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskScheduler * IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related: * How to get reference to PDF object embeded in IE * IE on Windows 11 * I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions * EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *I also encourage you to check awesome @trancexx code: * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuff * OnHungApp handler * Avoid "AutoIt Error" message box in unknown errors * HTML editor * winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/ "Homo sum; humani nil a me alienum puto" - Publius Terentius Afer"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming" , be and \\//_. Anticipating Errors : "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty." Signature last update: 2023-04-24
AdamUL Posted August 15, 2013 Posted August 15, 2013 (edited) @mlipokGlad I could help.Here are two more functions that can take up to 10 parameters each. My examples use 3 parameters, the truth tables get a lot larger after that. expandcollapse popup#NoTrayIcon ConsoleWrite("XOR Truth Table" & @LF) ConsoleWrite("_XOR(False, False) = " & _XOR(False, False) & @LF) ConsoleWrite("_XOR(False, True) = " & _XOR(False, True) & @LF) ConsoleWrite("_XOR(True, False) = " & _XOR(True, False) & @LF) ConsoleWrite("_XOR(True, True) = " & _XOR(True, True) & @LF & @LF) ConsoleWrite("XOR_Ex Truth Table" & @LF) ConsoleWrite("_XOR_Ex(False, False, False) = " & _XOR_Ex(False, False, False) & @LF) ConsoleWrite("_XOR_Ex(False, False, True) = " & _XOR_Ex(False, False, True) & @LF) ConsoleWrite("_XOR_Ex(False, True, False) = " & _XOR_Ex(False, True, False) & @LF) ConsoleWrite("_XOR_Ex(False, True, True) = " & _XOR_Ex(False, True, True) & @LF) ConsoleWrite("_XOR_Ex(True, False, False) = " & _XOR_Ex(True, False, False) & @LF) ConsoleWrite("_XOR_Ex(True, False, True) = " & _XOR_Ex(True, False, True) & @LF) ConsoleWrite("_XOR_Ex(True, True, False) = " & _XOR_Ex(True, True, False) & @LF) ConsoleWrite("_XOR_Ex(True, True, True) = " & _XOR_Ex(True, True, True) & @LF & @LF) ConsoleWrite("XNOR Truth Table" & @LF) ConsoleWrite("_XNOR(False, False) = " & _XNOR(False, False) & @LF) ConsoleWrite("_XNOR(False, True) = " & _XNOR(False, True) & @LF) ConsoleWrite("_XNOR(True, False) = " & _XNOR(True, False) & @LF) ConsoleWrite("_XNOR(True, True) = " & _XNOR(True, True) & @LF & @LF) ConsoleWrite("XNOR_Ex Truth Table" & @LF) ConsoleWrite("_XNOR_Ex(False, False, False) = " & _XNOR_Ex(False, False, False) & @LF) ConsoleWrite("_XNOR_Ex(False, False, True) = " & _XNOR_Ex(False, False, True) & @LF) ConsoleWrite("_XNOR_Ex(False, True, False) = " & _XNOR_Ex(False, True, False) & @LF) ConsoleWrite("_XNOR_Ex(False, True, True) = " & _XNOR_Ex(False, True, True) & @LF) ConsoleWrite("_XNOR_Ex(True, False, False) = " & _XNOR_Ex(True, False, False) & @LF) ConsoleWrite("_XNOR_Ex(True, False, True) = " & _XNOR_Ex(True, False, True) & @LF) ConsoleWrite("_XNOR_Ex(True, True, False) = " & _XNOR_Ex(True, True, False) & @LF) ConsoleWrite("_XNOR_Ex(True, True, True) = " & _XNOR_Ex(True, True, True) & @LF & @LF) Func _XOR($A, $B) ;~ Return ($A And (Not $B)) Or ((Not $A) And $B) Return ($A Or $B) And (Not ($A And $B)) EndFunc Func _XOR_Ex($A, $B, $C = False, $D = False, $E = False, $F = False, $G = False, $H = False, $I = False, $J = False) Local $fResult = False Select Case @NumParams >= 2 $fResult = _XOR($A, $B) If @NumParams > 2 Then ContinueCase Case @NumParams >= 3 $fResult = _XOR($fResult, $C) If @NumParams > 3 Then ContinueCase Case @NumParams >= 4 $fResult = _XOR($fResult, $D) If @NumParams > 4 Then ContinueCase Case @NumParams >= 5 $fResult = _XOR($fResult, $E) If @NumParams > 5 Then ContinueCase Case @NumParams >= 6 $fResult = _XOR($fResult, $F) If @NumParams > 6 Then ContinueCase Case @NumParams >= 7 $fResult = _XOR($fResult, $G) If @NumParams > 7 Then ContinueCase Case @NumParams >= 8 $fResult = _XOR($fResult, $H) If @NumParams > 8 Then ContinueCase Case @NumParams >= 9 $fResult = _XOR($fResult, $I) If @NumParams > 9 Then ContinueCase Case @NumParams >= 10 $fResult = _XOR($fResult, $J) EndSelect Return $fResult EndFunc Func _XNOR($A, $B) Return Not _XOR($A, $B) ;~ Return ($A And $B) Or ((Not $A) And (Not $B)) EndFunc Func _XNOR_Ex($A, $B, $C = False, $D = False, $E = False, $F = False, $G = False, $H = False, $I = False, $J = False) Local $fResult = False Select Case @NumParams >= 2 $fResult = _XOR($A, $B) If @NumParams > 2 Then ContinueCase Case @NumParams >= 3 $fResult = _XOR($fResult, $C) If @NumParams > 3 Then ContinueCase Case @NumParams >= 4 $fResult = _XOR($fResult, $D) If @NumParams > 4 Then ContinueCase Case @NumParams >= 5 $fResult = _XOR($fResult, $E) If @NumParams > 5 Then ContinueCase Case @NumParams >= 6 $fResult = _XOR($fResult, $F) If @NumParams > 6 Then ContinueCase Case @NumParams >= 7 $fResult = _XOR($fResult, $G) If @NumParams > 7 Then ContinueCase Case @NumParams >= 8 $fResult = _XOR($fResult, $H) If @NumParams > 8 Then ContinueCase Case @NumParams >= 9 $fResult = _XOR($fResult, $I) If @NumParams > 9 Then ContinueCase Case @NumParams >= 10 $fResult = _XOR($fResult, $J) EndSelect Return Not $fResult EndFuncAdam Edited August 15, 2013 by AdamUL
cryptotitan Posted January 6, 2020 Posted January 6, 2020 it would be great if the xorAray function appeared for an example, I have an array $ ArrA [[3] [3] and an array $ ArrB [[1000] [1000]] and in order to process this data I have to create a loop in a loop fingering the neighboring cells of array B by the array of array A. I understand that it is easier to use "exclusive or" thereby increasing the speed of data processing by 64 times. I dream of such a function _XORaray ($ arrA, $ arrB) return $ ArrC PS: in my case, this applies to the wave path search.
RTFC Posted January 11, 2020 Posted January 11, 2020 @cryptotitan: you may wish to look into the functionality of the various CwiseLogicalOp functions in Eigen4AutoIt. My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O
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