There is a way to Mouse Click on Entry without clicking on info button


#1

Hello, I would know if there is a way that I can call mouse click left that dont click on the info button on certain entry.
Capture

Thanks!


#2

nope, you have to initialize the menu


#3

The things with that is that it doesnt select the items😬


#4

what you want to do, more exactly?


#5

Maby im unclear, I thing that there is two type of selection. One is about having the mouse over without click and the other is about over and clicking. That is I want to click on a entry with left click. By right clicking on the info icon it dosent select and dont show info about item. And that dont solve my problem. When I use mouse click left it some time click on the info icon and dosnt select by click nor by mouse over. The best exemple of that is entry in the Browse tab on the market.


#6

hmmmmmm from what I see no, you have no options because:

the entry text ( crokite ) is not correlated with his icon “i” on the tables. not in colons; nor on rows.

the only place where I see the picture for ‘info’ is in sprite.: /icons/38_16_222.png its the same picture for all. and also if on entry text you have 10 entrys, on sprite you have 17
The only way ( in my opinion) if you want to click on “i” icon is math:
you “move” the mouse on row ( entry) until he met the picture at the end of table.


#7

I fear there is no other option than making a verification.
Before the next action the bot will have to do make sure the info window is not open.
If it is open, close and retry your selection
if it is not… next step.


#8

if I understand your issue correctly, you want to prevent bot to click on the “i” icon on some entries, because as he is randomly selects where to click sometimes he hit little i and therefore entry is not clicked.

is that what are you asking for?


#9

Yes! Exactly​:unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn::unicorn:


#10

For now I dont know how I can use Mouse Click Left or some things like that to select an area to click on a entry.


#11

well, I dont think is easily doable, cos those little “i” are pictures and test if it was on it or not would be painful.
What you can do instead is add whatever window will open from that “i” to your window-closing-method so if opened it will be closed automatically, and since element was not clicked, bot will repeat self and most likely will not hit “i” twice in a row :slight_smile:


#12

I dont realy want to know if there is a info icon. Maby I can just suppose there are alwais here. So that I just click on entry without a region. I thing that if the were a parameter for mouse click to restrain a certain region it will do the job.

Exemple: We know the region of an entry. So we can pass a or some parameter that reduce by x,y,z,t the maximum of where the mouse click on height and length…


#13

Yes, you can supply the API it a smaller region to click on, using the parameter called RegionReplacement.

There is a code example of how to reduce the size of the region on the right side, so this should cover the case of the info icon. You can find the code at


#14

When I use it, nothing appen, that is there is no mouse mouve.

This is how I use it.


#15

I see only an image there but I does not even seem to show the complete script.

What script did you use? When I have the complete script, I can take a look at that.


#16
using BotSharp.ToScript.Extension;
using Parse = Sanderling.Parse;
using Bib3.Geometrik;

Sanderling.Interface.MemoryStruct.WindowRegionalMarket Market => Measurement?.WindowRegionalMarket?.FirstOrDefault();

static MotionParam MouseClickWithRegionSubstituted(IUIElement destination, RectInt region, MouseButtonIdEnum mouseButton,	int repetitionCount = 0) =>
	new MotionParam
	{
		MouseListWaypoint = new[] { new MotionParamMouseRegion { UIElement = destination, RegionReplacement = region, } },
		MouseButton = new[] { mouseButton },
		MouseButtonRepetitionCount = repetitionCount,
	};
	
static MotionParam MouseClickWithRegionReducedByTenOnTheRight(IUIElement destination, MouseButtonIdEnum mouseButton, int repetitionCount = 0) =>
	MouseClickWithRegionSubstituted(destination, RectInt.FromMinPointAndMaxPoint(destination.Region.MinPoint(), new Vektor2DInt(destination.Region.Max0 - 10, destination.Region.Max1)),	mouseButton,repetitionCount);

while(true)
{
	MouseClickWithRegionReducedByTenOnTheRight(Market?.MyOrders?.SellOrderView?.Entry?.ElementAtOrDefault(0), MouseButtonIdEnum.Left, 0);
	Host.Delay(1000);
}

To work properly, it should have an entry in my sell orders on the market.


#17

The IDE shows me two errors in that code, so there is information about what errors there are and where in the code.

Does the IDE not show the descriptions of the errors in your case?
Does it not show the errors locations?


#18
Sanderling.Parse.IMemoryMeasurement	Measurement	=>	Sanderling?.MemoryMeasurementParsed?.Value;

Oui, il manque cette ligne avant la variable Market. Pour une raison que j’ignore un mauvais caractère s’est glissé lors de la copie( après l’égalité), c’est une flèche vers la droite. Et ça marche toujours pas.


#19

il manque ( ou c’est correct de ce maniere)

Sanderling.Parse.IMemoryMeasurement Measurement =>
    Sanderling?.MemoryMeasurementParsed?.Value;
Sanderling.Interface.MemoryStruct.WindowRegionalMarket Market = Measurement?.WindowRegionalMarket?.FirstOrDefault();

ou pour measurer ( evaluer et utiliser directement) var x = Market?.(qqch => qqch?.Text … par example)

Sanderling.Parse.IMemoryMeasurement Measurement =>
    Sanderling?.MemoryMeasurementParsed?.Value;
Sanderling.Interface.MemoryStruct.WindowRegionalMarket Market =>
Measurement?.WindowRegionalMarket?.FirstOrDefault();

#20

The last block code is the right way!