The Sogdian script was an offshoot of the Aramaic script adopted to write Sogdian, a Middle Iranian language related to Pahlavi (or Middle Persian). It was primarily used in the area around the ancient city of Samarkand, which roughly corresponds to the modern country of Uzbekistan, but a substantial corpus also comes from the oasis town of Turfan in the Xinjiang Uighur Autonomous Region in modern China where many Sogdians settled. Almost certainly this was where the Uighur adopted their script.
The following is the Sogdian alphabet.
Like many other Aramaic-derived scripts, each letter contains three forms, an initial form which is used at the beginning of a word, a final form which appears at the end of a word, and a medial form which is applied at the "inside" of a word.
The Sogdian script initially retained the right-to-left writing direction of Aramaic, but around the 8th century CE the orientation rotated 90 degrees in the counterclockwise direction, resulting in a script that is written in vertical column from top to bottom and columns are ordered from left to right. While it is possible that this occurred due to influence from Chinese, but it is just as likely that the change occurred independently.