Skip to content

# anyRemote

# Set(image ... ) command

Note: Supported in J2ME client only

This command used to show images on screen of cell phone.

## Format

Set(image,window,_image_file_name) or

ExecAndSet(image,window, ... command to determine image file name ...) or

Set(image,icon,_icon_name_,_image_file_name_) or

ExecAndSet(image,icon,_icon_name_, ... command to determine image file name ...) or

Set(image,show|close|cursor|nocursor|dynamic_cursor|set_cursor) or

Set(image,remove_all|clear_cache)

## Usage

### Set(image,window ...)

Command Set(image,window,_image_file_name) used to show image on screen of cell phone. Of cource in most cases this should be ExecAndSet(...) variant of command. See cfg-example/Server-mode/winManager.cfg for details.

    1=ExecAndSet(image,window,echo "$IMAGE_DIR/image.png")

### Set(image,show)

Command Set(image,show) used to show previously uploaded image.

    2=Set(image,show)

### Set(image,close)

Command Set(image,close) used to close screen with image and return back to main screen.

    3=Set(image,close)

### Set(image,cursor|nocursor)

Command Set(image,cursor|nocursor) used to specify should or should not the cursor cross will be drawn over the image. If this option is set to "cursor" then it will be possible to move cursor cross with the joystick keys and if user pushes the joystick key, then two replies PressedX(x_coord,) and PressedY(y_coord,) will be sent. PressedX() event will be first one.

    4=Set(image,nocursor)

### Set(image,dynamic_cursor)

Command Set(image,dynamic_cursor) Is similar to Set(image,cursor), but each time user press joystrick key two replies PosX(x_coord,) and PosY(y_coord,) will be sent. PosX() event will be first one.

    5=Set(image,dynamic_cursor)

### Set(image,set_cursor ...)

Command Set(image,set_cursor, x_coord, y_coord) used to set cursor position on screen of cell phone.

    6=Set(image,set_cursor,0,0)

To retrieve current cursor position use Get(cursor) command.

### Set(image,icon ...)

Command Set(image,icon,_icon_name_,_image_file_name) used to upload 16x16, 32x32, 48x48, 64x64 and 128x128 icons, which could be used in Set(icons,...) command. Of cource in most cases this should be ExecAndSet(...) variant of command. See cfg-example/Server-mode/iconUpload.cfg for details.

    7=ExecAndSet(image,icon,echo "$IMAGE_NAME,$IMAGE_DIR/image.png")

Only 16x16, 32x32, 48x48, 64x64 and 128x128 PNG icons could be uploaded. There is no way to show the list of uploaded icons.

All uploaded icons could be removed by Set(image,remove_all) command.

All icons used by J2ME client cached in phone's memory. It is possible to cleanup that cache by Set(image,clear_cache) command.

### Icon auto-uploading

Starting from anyRemote-4.16/anyremote-J2ME-client-4.13 icon auto-uploading is supported. So, if there is a command

So, if there is a command

    1=Set(icons,TheTitle,1,my-new-icon);

and my-new-icon.png is absent in J2ME client, then anyRemote will search it in $(CfgDir)/Icons/_icon_size_ directory and automatially upload it to the phone if found (_icon_size_ can be 16,32,48,64 or 128).

It is not recommended to use this feature on Samsung's because of terrible upload speed.

### Set(image,remove_all)

Command Set(image,remove_all) used to remove all previously uploaded icons.

    0=Set(image,remove_all)

### Set(image,clear_cache)

Command Set(image,clear_cache) used to cleanup cache of used icons on J2ME client.

    1=Set(image,clear_cache)

## Retrieving size of the screen

To retrive size of the screen of the cellphone it is possible to use Get(screen_size) command.

Maintained by anyRemote. Website by m.lettner.