Drag and drop

I want to cutomize my Application tool bar, i am giving following code.

Drag Imagelocation((Text:“Ratings”, TextSize:“11”,TextFont:“LucidaGrande”, TextColor:(0,0,0),TextBackgroundColor:(232,232,232)))

Moveto(0, 0)

Drop Imagelocation((Text:“Ratings”, TextSize:“11”,TextFont:“LucidaGrande”, TextColor:(0,0,0),TextBackgroundColor:(232,232,232)))

–Here Ratings is Icon which i want to Drag to the tool bar and drop it.

But it is moving to left corner of the screen and coming back.

Please Help me …

Thanks
Vamsi

It’s moving to the left corner because that’s what the command MoveTo(0,0) does. Your Drag command is correct, but it should be followed by a Drop command that designates the target where you want to drop the icon. So, is there an icon already on the toolbar that you could Drag the Ratings icon to? Script it just the way you would do it as a user. If you need to script the Drop to occur next to an item on the toolbar, use the image hotspot to do that (see page 10 of the Using Eggplant guide under the Help menu).

Hi Matt,

Some Icons is already there in the Toolbar. I Want to add one more icon i.e Ratings. If we take any image of existing icon Some times script will Fail(When the Captured Image is not there in the Toolbar).

Thanks
Vamsi

Hi Matt,

It’s working fine, I taken screen title as a property.

And i taken hotspot to drop the icon.

Thanks
Vamsi