Jump to content

Calculator


Yashied
 Share

Recommended Posts

Mainly the fact that it wasn't obvious at first. After failing to quit with escape and finding nothing on the GUI, I decided to quit using Task Manager. I didn't see anything in the system tray, though I should have thought to right click the the task bar icon :mellow: I can imagine that a lot of users might struggle with it at first.

I specifically drew the button on the screenshot in first post.

:(

Edited by Yashied
Link to comment
Share on other sites

Link to comment
Share on other sites

The program has been updated (version number has not changed). Now when you paste data from the clipboard will be calculated an expression (if possible), for example the string "(5 + 5) * 10" will be pasted as "100". Enjoy.

Edited by Yashied
Link to comment
Share on other sites

The program has been updated to version 1.3.

Сhanges:

  • Improved algorithm of loading and checking skins.
  • Improved algorithm for protection against re-launch the program.
  • Changed GUI for support additional features skins (yet undocumented).
  • Slightly improved performance.
  • Fixed several minor bugs.
Link to comment
Share on other sites

  • 2 weeks later...

The program has been updated to version 1.4.

Сhanges:

  • Added support for the following buttons (only for additional skins) and their corresponding shortcuts: "+/-", "%", "Sqrt", "X^2", "X^Y", "1/X" и "Backspace".
  • Added new skin - Dark Project (thanks Garrett).
Link to comment
Share on other sites

  • 5 months later...
Link to comment
Share on other sites

  • 11 months later...

If someone want to replace the default windows calculator by this one, just use this reg key:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\calc.exe]
"Debugger"="C:\\Windows\\Calculator.exe /z"

replace "C:\\Windows\\Calculator.exe /z" for whatever you put the exe.

I don't understand why in hell ms calculator doesn't have a "always on top" function like this one.

therefore it's not as featured as ms calculator, this one simply rocks!

thank you Yashied.

Edited by revertex
Link to comment
Share on other sites

  • 6 months later...

Thanks Yashied. I love the calculator and the skins. It's very inspiring for one who would like to build a project with a nice GUI.

But I have questions and issues I have to report. It seems there are problems with the Calculator_source package that need to be fixed.

______________________________________________________________________

1/ About your Calculator.exe provided in the binary package, although it seems to work fine on my computer, I explored its ressources and I noticed that string table section reports some autoIT errors:

101 (Paused)
102 AutoIt Error
103 AutoIt has detected the stack has become corrupt.
Stack corruption typically occurs when either the wrong calling convention is used or when the function is called with the wrong number of arguments.
AutoIt supports the __stdcall (WINAPI) and __cdecl calling conventions.  The __stdcall (WINAPI) convention is used by default but __cdecl can be used instead.  See the DllCall() documentation for details on changing the calling convention.
105 Badly formatted "Func" statement.
107 Missing right bracket ')' in expression.
108 Missing operator in expression.
109 Unbalanced brackets in expression.
110 Error in expression.
111 Error parsing function call.
112 Incorrect number of parameters in function call.
113 "ReDim" used without an array variable.
114 Illegal text at the end of statement (one statement per line).
115 "If" statement has no matching "EndIf" statement.
116 "Else" statement with no matching "If" statement.
117 "EndIf" statement with no matching "If" statement.
118 Too many "Else" statements for matching "If" statement.
119 "While" statement has no matching "Wend" statement.
120 "Wend" statement with no matching "While" statement.
121 Variable used without being declared.
122 Array variable has incorrect number of subscripts or subscript dimension range exceeded.
123 Array variable subscript badly formatted.
124 Subscript used with non-Array variable.
125 Too many subscripts used for an array.
126 Missing subscript dimensions in "Dim" statement.
127 No variable given for "Dim", "Local", "Global", "Struct" or "Const" statement.
128 Expected a "=" operator in assignment statement.
129 Invalid keyword at the start of this line.
130 Array maximum size exceeded.
131 "Func" statement has no matching "EndFunc".
132 Duplicate function name.
133 Unknown function name.
134 Unknown macro.
136 Unable to get a list of running processes.
137 Unable to get the process token.
138 Invalid element in a DllStruct.
139 Unknown option or bad parameter specified.
140 Unable to load the internet libraries.
141 "Struct" statement has no matching "EndStruct".
142 Unable to open file, the maximum number of open files has been exceeded.
144 Invalid file filter given.
145 Expected a variable in user function call.
146 "Do" statement has no matching "Until" statement.
147 "Until" statement with no matching "Do" statement.
148 "For" statement is badly formatted.
149 "Next" statement with no matching "For" statement.
150 "ExitLoop/ContinueLoop" statements only valid from inside a For/Do/While loop.
151 "For" statement has no matching "Next" statement.
152 "Case" statement with no matching "Select"or "Switch" statement.
153 "EndSelect" statement with no matching "Select" statement.
154 Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.
155 Cannot make existing variables static.
156 Cannot make static variables into regular variables.
157 Badly formated Enum statement
159 This keyword cannot be used after a "Then" keyword.
160 "Select" statement is missing "EndSelect" or "Case" statement.
161 "If" statements must have a "Then" keyword.
162 Badly formated Struct statement.
163 Cannot assign values to constants.
164 Cannot make existing variables into constants.
165 Only Object-type variables allowed in a "With" statement.
166 "long_ptr", "int_ptr" and "short_ptr" DllCall() types have been deprecated.  Use "long*", "int*" and "short*" instead.
167 Object referenced outside a "With" statement.
168 Nested "With" statements are not allowed.
169 Variable must be of type "Object".
170 The requested action with this object has failed.
171 Variable appears more than once in function declaration.
172 ReDim array can not be initialized in this manner.
173 An array variable can not be used in this manner.
174 Can not redeclare a constant.
175 Can not redeclare a parameter inside a user function.
176 Can pass constants by reference only to parameters with "Const" keyword.
177 Can not initialize a variable with itself.
178 Incorrect way to use this parameter.
179 "EndSwitch" statement with no matching "Switch" statement.
180 "Switch" statement is missing "EndSwitch" or "Case" statement.
181 "ContinueCase" statement with no matching "Select"or "Switch" statement.
182 Assert Failed!
184 Obsolete function/parameter.
185 Invalid Exitcode (reserved for AutoIt internal use).

and

5000 Unable to parse line.
5001 Unable to open the script file.
5002 String missing closing quote.
5003 Badly formated variable or macro.
5004 Missing separator character after keyword.

Can it be solved? Is it important?

______________________________________________________________________

2/ The Calculator.exe compiled with compile.cmd is slightly different from your Calculator.exe and it doesn't work:

Posted Image

Calculator.exe = 966 791 bytes

Calculator.exe = 975 025 bytes (without UPX compression)

Updating WinAPIEx.au3 doesn't solve the problem.

______________________________________________________________________

3/ AutoIt3Wrapper.exe provided in Utilities package is version 2.0.1.24. If I use the last 2.1.0.8 version, the compile.cmd fails: no compile window displays, nothing happens and no binary is output.

Why the compilation fails with the last AutoIt3Wrapper?

______________________________________________________________________

4/ If I used the Scite SyntaxCheck Prod (CTRL+F5) on Calculator.au3, it reports errors:

+>22:59:21 Starting AutoIt3Wrapper v.2.1.0.8    Environment(Language:040C  Keyboard:0000040C  OS:WIN_XP/Service Pack 3  CPU:X64 OS:X86)
>Running AU3Check (1.54.22.0)  from:D:\Mes Programmes\Outils\AutoIt
D:\AutoIT\Yashied calculator with skins\Calculator_source\UDFs\WinAPIEx.au3(1752,38) : ERROR: $TMPF_FIXED_PITCH previously declared as a 'Const'.
Global Const $TMPF_FIXED_PITCH = 0x01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\AutoIT\Yashied calculator with skins\Calculator_source\UDFs\WinAPIEx.au3(1753,33) : ERROR: $TMPF_VECTOR previously declared as a 'Const'.
Global Const $TMPF_VECTOR = 0x02
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\AutoIT\Yashied calculator with skins\Calculator_source\UDFs\WinAPIEx.au3(1754,35) : ERROR: $TMPF_TRUETYPE previously declared as a 'Const'.
Global Const $TMPF_TRUETYPE = 0x04
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\AutoIT\Yashied calculator with skins\Calculator_source\UDFs\WinAPIEx.au3(1755,33) : ERROR: $TMPF_DEVICE previously declared as a 'Const'.
Global Const $TMPF_DEVICE = 0x08
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\AutoIT\Yashied calculator with skins\Calculator_source\UDFs\WinAPIEx.au3(11217,34) : ERROR: _WinAPI_GetTextMetrics() already defined.
Func _WinAPI_GetTextMetrics($hDC)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\AutoIT\Yashied calculator with skins\Calculator_source\Calculator.au3 - 5 error(s), 0 warning(s)
!>22:59:22 AU3Check ended.rc:2
>Exit code: 0   Time: 1.484

[list][*]AutoIt 3.3.8.1[*]Win XP PRO SP3[/list]

Link to comment
Share on other sites

  • 1 year later...
Link to comment
Share on other sites

  • 5 years later...
  • 10 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...