




Quote from emo on February 3, 2023, 10:59 pm@yasin no error here, run the pub to see if gives u an error
@yasin no error here, run the pub to see if gives u an error
Uploaded files:



Quote from YASIN on February 3, 2023, 11:09 pm@emmanuel-fernandez it did not work
@emmanuel-fernandez it did not work

Quote from emo on February 3, 2023, 11:23 pm@yasin
and if u inicialize with...
DefineVar "[er]" "Integer" "" "Global" "" SetVar "[er]" "" DefineVar "[pa]" "Integer" "" "Global" "" SetVar "[pa]" "" Math "([ScreenHeight]-290)/2" "0" "[er]" Math "([ScreenWidth]-950)/2" "0" "[pa]"
and if u inicialize with...
DefineVar "[er]" "Integer" "" "Global" "" SetVar "[er]" "" DefineVar "[pa]" "Integer" "" "Global" "" SetVar "[pa]" "" Math "([ScreenHeight]-290)/2" "0" "[er]" Math "([ScreenWidth]-950)/2" "0" "[pa]"

Quote from YASIN on February 3, 2023, 11:25 pmFailed again @emmanuel-fernandez
Failed again @emmanuel-fernandez

Quote from emo on February 3, 2023, 11:32 pm@yasin Well, I can't think of anything else, try to ask @hpw for help to see if he knows why you get an error and the rest don't
@yasin Well, I can't think of anything else, try to ask @hpw for help to see if he knows why you get an error and the rest don't
Quote from Gaev on February 3, 2023, 11:37 pm@yasin
Worked for me too.
1) What is the version of your VisualNEOWin ? ... mine is 21.9.9
2) Create an all new pub; then try these tests (one by one), and advise of your results ...
a) use variables other than [er] or [pa]
Math "([ScreenHeight]-290)/2" "0" "[yasiner]" Math "([ScreenWidth]-950)/2" "0" "[yasinpa]"b) avoid the division sign
Math "([ScreenHeight]-290)" "0" "[yasiner]" Math "([ScreenWidth]-950)" "0" "[yasinpa]"c) remove the minus sign as well
Math "[ScreenHeight]" "0" "[yasiner]" Math "[ScreenWidth]" "0" "[yasinpa]"
Worked for me too.
1) What is the version of your VisualNEOWin ? ... mine is 21.9.9
2) Create an all new pub; then try these tests (one by one), and advise of your results ...
a) use variables other than [er] or [pa]
Math "([ScreenHeight]-290)/2" "0" "[yasiner]" Math "([ScreenWidth]-950)/2" "0" "[yasinpa]"
b) avoid the division sign
Math "([ScreenHeight]-290)" "0" "[yasiner]" Math "([ScreenWidth]-950)" "0" "[yasinpa]"
c) remove the minus sign as well
Math "[ScreenHeight]" "0" "[yasiner]" Math "[ScreenWidth]" "0" "[yasinpa]"

Quote from YASIN on February 4, 2023, 12:09 am@gaev
I do not know the version of the app
I created a new pub file and new variables
In mode A: display error.
In mode B: the result was correct.
In mode C: the result was correct. ([ScreenHeight]=[yasiner] and [ScreenWidth]=[yasinpa] )
I do not know the version of the app
I created a new pub file and new variables
In mode A: display error.
In mode B: the result was correct.
In mode C: the result was correct. ([ScreenHeight]=[yasiner] and [ScreenWidth]=[yasinpa] )
Quote from Gaev on February 4, 2023, 6:20 am@yasin
I do not know the version of the app
While in design Mode, press function key F2
In mode B: the result was correct.
In mode C: the result was correct.Looks like the division sign is causing the error on your machine; perhaps something in your Windows Regional Setting.
Try this command ...
SetVar "[myNumber]" "50" Math "[myNumber]/2" "0" "[er]"... if it also fails, then the division character is definitely the problem ... in which case you might want to replace "division by 2" with "multiplication by 0.5" ...
Math "([ScreenHeight]-290)*0.5" "0" "[er]" Math "([ScreenWidth]-950)*0.5" "0" "[pa]"
I do not know the version of the app
While in design Mode, press function key F2
In mode B: the result was correct.
In mode C: the result was correct.
Looks like the division sign is causing the error on your machine; perhaps something in your Windows Regional Setting.
Try this command ...
SetVar "[myNumber]" "50" Math "[myNumber]/2" "0" "[er]"
... if it also fails, then the division character is definitely the problem ... in which case you might want to replace "division by 2" with "multiplication by 0.5" ...
Math "([ScreenHeight]-290)*0.5" "0" "[er]" Math "([ScreenWidth]-950)*0.5" "0" "[pa]"

Quote from HPW on February 4, 2023, 9:07 amHello,
You may also place a text-object with [ScreenHeight] and [ScreenWidth] on screen to look if they are correctly set.
Regards
Hans-Peter
Hello,
You may also place a text-object with [ScreenHeight] and [ScreenWidth] on screen to look if they are correctly set.
Regards
Hans-Peter

Quote from YASIN on February 5, 2023, 8:53 pm@gaev
my ver is 21.9.9
SetVar "[myNumber]" "50" Math "[myNumber]/2" "0" "[er]"result : er=50 :)
Math "([ScreenHeight]-290)*0.5" "0" "[er]" Math "([ScreenWidth]-950)*0.5" "0" "[pa]"It is true
my ver is 21.9.9
SetVar "[myNumber]" "50" Math "[myNumber]/2" "0" "[er]"
result : er=50 :)
Math "([ScreenHeight]-290)*0.5" "0" "[er]" Math "([ScreenWidth]-950)*0.5" "0" "[pa]"
It is true

Quote from Gaev on February 5, 2023, 9:24 pm@yasin
my ver is 21.9.9
Looks uptodate.
Just to confirm, what version of Windows are you using ? ... and is it natively installed or something that emulates Windows under another operating system ?
result : er=50 :)
Very interesting (but unexpected) result.
Now it is clear that the problem is with the division sign
But how should I fix it?Since others (including me) do not encounter any problems, I still think it has something to do with your environment.
Before I suggest you delete and reinstall VisualNEOWin, you might try this ...
SetVar "[abcd]" "790" SetVar "[er]" "([abcd]-290)/2"... and then ...
SetVar "[er]" "([ScreenHeight]-290)/2"
my ver is 21.9.9
Looks uptodate.
Just to confirm, what version of Windows are you using ? ... and is it natively installed or something that emulates Windows under another operating system ?
result : er=50 :)
Very interesting (but unexpected) result.
Now it is clear that the problem is with the division sign
But how should I fix it?
Since others (including me) do not encounter any problems, I still think it has something to do with your environment.
Before I suggest you delete and reinstall VisualNEOWin, you might try this ...
SetVar "[abcd]" "790" SetVar "[er]" "([abcd]-290)/2"
... and then ...
SetVar "[er]" "([ScreenHeight]-290)/2"
Quote from Gaev on February 5, 2023, 9:31 pm@yasin
Another thing to try ...
SetVar "[myHeight]" "[ScreenHeight]" SetVar "[myDivisor]" "2" Math "([myHeight]-290)/[myDivisor]" "0" "[myAnswer]"
Another thing to try ...
SetVar "[myHeight]" "[ScreenHeight]" SetVar "[myDivisor]" "2" Math "([myHeight]-290)/[myDivisor]" "0" "[myAnswer]"

Quote from YASIN on February 5, 2023, 9:34 pm@gaev
My Windows is natively installed (Windows 10 Pro)
SetVar "[abcd]" "790" SetVar "[er]" "([abcd]-290)/2"result : er=(790-290)/2
SetVar "[er]" "([ScreenHeight]-290)/2"
result : (864-290)/2
My Windows is natively installed (Windows 10 Pro)
SetVar "[abcd]" "790" SetVar "[er]" "([abcd]-290)/2"
result : er=(790-290)/2
SetVar "[er]" "([ScreenHeight]-290)/2"
result : (864-290)/2